Hey all. This is something that I have wanted to do for a long time, and that is a pixelated view effect that runs with raytracing in real time. I managed to get this running from 18 FPS to well over
150 FPS (and if I cap the rendering to 60 FPS, my machine can even get over 250 FPS!).
Have a look!
Comparing to a typical raytracer:
My original non-optimised raytracer, 1 raycast per pixel, single threaded (benchmark) | 10-18 FPS at 100x100
My raytracer. 50% raycasts per frame, w/ parallel luau processing | 131-157 FPS at 100x100
Features:
As far as features goes for a raytracer, this has full on texturing and transparency support, all which runs very nicely.
Texture mapping:
Full lighting support with fast real-time baked PointLight and SpotLight rendering
Support for custom textures via the Texture instance
Skyboxes
Motion blur to hide rendering artefacts when moving the camera
With all these renderings tricks and optimisations combined, you can get some quite impressive results.
A 200x200 shot with all optimisation options enabled running around 85 FPS:
I took advantage of many rendering optimisations and tricks to achieve the high framerate.
Benchmarking - Average FPS for 100x100 real-time:
NOTE: The CPU on a device mostly determines the performance outcome this renderer.
Mid-end Office PC - Intel i7 - 105 FPS
-
DESCRIPTION: A dell XPS model. A fairly basic computer, but a good mid range device. Memory was upgraded to 16 GB.
-
CPU: Intel Core i7-9700 (8 core)
-
Memory: 16 GB
-
100x100 Interlaced [Default Settings]:
93 - 125 FPS (Average: 105) -
100x100 Interlaced + Pixel Sleeping (No Textures):
204 - 240+ FPS (Average: 230)
-
High-end Gaming PC - AMD Ryzen 7 - 140 FPS
-
DESCRIPTION: My personal computer. Bought this machine early this year.
-
CPU: AMD Ryzen 7 5700X (8 core)
-
Memory: 32 GB
-
100x100 Interlaced [Default Settings]:
112 - 164 FPS (Average: 140) -
100x100 Interlaced + Pixel Sleeping (No Textures):
192 - 240+ FPS (Average: 210)
-
Get RetroRaster:
You can purchase RetroRaster here on Itch:
Please note; Currently, due to the use of EditableImage, RetroRaster is only useable to certain users that meet the following requirements:
- 13+
- ID-verified