To achieve this, I used an large step count that is refined with a binary-like method, then it intorpelates (when rendering) the rays to give the impression of higher resolution. On Scratch it is ~35 FPS normally and 18 FPS on HIGHquality and on Turbowarp it is around 150 FPS on HIGHquality.
https://turbowarp.org/1269780759?fps=60&hqpen&stuck