(sorry for the low quality demo, i was trying to keep the obs from adding even more lag)
without obs, it stands at ~18 fps in 80x80 resolution
raycasting, edge detection, and ascii gradient quantization are all computed in parallel using ComputeLua
It’s dependent on your computer’s specs and mine isn’t really optimized for gaming; and since roblox doesn’t have GPU support, we’re limited to using the CPU + we can’t precisely get the screen pixels so we’d have to use raycast, which is by far the longest task. If we could get the screen pixels, then It’d be way faster (150 ms faster, which seems small but it’ll get the frame delta time from 0.15s to 0.009s)
i already used !@#$%& and |, can’t figure out how to determine which character to use. i was just using the Value in the HSV form of the color of each pixel.
Mine uses the luminance value (approximate brightness) of each pixel, and since luminance is in the range of 0-1, I can just multiply it by #characters to get the appropriate character
It just multiplies each color channel by some predetermined weight and sum them all together, you can try googling it since I cant get on my pc as its being serviced right now
i was doing the difference of gaussians wrong, the sobel filter is supposed to be applied to the DoG value, but it was just purely for the edge detection treshold. now its corrected and parallelized for each edge detection step (Raycast → DoG → Sobel → ASCII)
when i hide the gui (the shader is still running), the gameplay feels smoother, so it might be that the textlabels (represented as pixels) is causing lag; or just that the renderer isnt fast enough (the gaussian blur is the slowest now)
the difference and gaussians + sobel filter took 200 ms (0.3s) each frame, the fps went from 14 to 18 consistently; so ig its time to optimize the gaussians
@finaIlyhappy ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀^ (click the reply above)
There should be a way, but I’m trying my best right now; I’m gonna implement some precomputations so that it gets a tad bit faster
did some tuning and now its doing a consistent 200 ms refresh rate instead of 400 ms (tried other alternatives to gaussian blur but they’re all trash with little to no improvement in performnce)