Switch to full stage
Loading Project
Loading project …

Instructions

Greetings, Scratchers This is a ray tracer! Just set the parameters, then watch it render a (somewhat) realistic image of some spheres. You can also change the position, size, and materials of the spheres if you go inside the project. Feel free to experiment! If you want to render a higher quality image and keep what's left of your sanity, use turbowarp: https://turbowarp.org/710188449?turbo So far it supports anti-aliasing through multisampling, materials (lambertian and metal), gamma 2 correction, and... other stuff. This implementation is highly questionable and horribly unoptimised, but hey, at least it works. #ray #madness

Notes and Credits

Based on "Ray Tracing in One Weekend": https://raytracing.github.io/books/RayTracingInOneWeekend.html For more info on ray tracing: https://en.wikipedia.org/wiki/Ray_tracing_(graphics)

TurboWarp is a Scratch mod that compiles projects to JavaScript to make them run really fast. Try it out by inputting a project ID or URL above or choosing a featured project below.