Tiny Raytracer

Every pixel you see is one ray of simulated light, followed backwards from the camera until it hits something, bounces, and finds the lamp — or the sky. No 3D library and no shaders, just arithmetic on a canvas, refining the picture one sample at a time. Drag the scene to orbit and watch it re-focus.

A ray-traced scene of five spheres on a checkered floor. Your browser does not support canvas.
tracing
drag to orbit · arrow keys work too

Readout

0samples / px
—rays / sec
0.0selapsed

— × — px · 3 bounces · 1 lamp

The lamp is a small glowing sphere, not a pinprick. Every pass aims its shadow ray at a different spot on it, so shadow edges soften as the samples pile up.

Surface

0% is chalky paint, 100% is a polished mirror. Shiny surfaces reflect more at glancing angles — that is why the floor shines near the horizon.

Quality

Fewer pixels means more samples per second, so noise clears sooner.