r/raytracing
•
u/Objective-Silver-770
•
7d ago
Raytracing glass and reflective spheres in Scratch: looking for optimization feedback
I made this raytracer with Scratch blocks. It supports reflective chrome and gold, refracting glass, soft shadows, and a movable camera. After moving, the render progresses from blocky to sharp.
The screenshot uses the four-rays-per-pixel anti-aliasing mode on Scratch's 480 x 360 stage.
Project and block source: https://scratch.mit.edu/projects/1437715094/
This took a long time to make, and I'm trying to improve the rendering speed. If you take a look at the blocks, I'd appreciate suggestions on where to focus optimization. Also curious what you'd change about the glass or reflections.


