How it works
The scene is a chess set of glass and gold pieces on a polished marble board, lit by a brass desk lamp and seen through a camera lens. Your device's graphics chip computes the lighting, the caustics (bright patterns where the glass focuses light onto the board), the reflections and the depth of field (the blur in front of and behind the point of focus) as you watch. Rendering is paused while this page is open.
How the light is traced as a wavefront
Renderers that simulate light realistically usually trace huge numbers of independent rays or photons and average the results. The picture stays grainy until enough results have been averaged. In this renderer the lamp emits a mesh instead. The mesh is a grid of points on the wavefront, which is the advancing edge of the light as it spreads out from the lamp. Each point moves as a ray of light would, reflecting off the gold and bending through the glass, and stays joined to its neighbours as it moves.
Because the points stay joined, the lamp's light arrives without grain. When a patch of the mesh lands on a surface, its brightness is the light it carries divided by the area it covers. Light that converges onto a small area becomes brighter, and light that spreads out over distance becomes dimmer. Where the wavefront folds over itself, a patch's area shrinks towards zero and its light concentrates into a caustic. The mesh adds more points where it curves strongly, which keeps the edges of the caustics sharp.
Why moving the camera doesn't recompute the lighting
The light that lands is stored on the surfaces, together with an estimate of the light that bounces between them. None of it depends on where the camera is. While you move, the lighting calculation pauses and only the camera's picture is redrawn, which keeps the image free of grain. The thin bar at the top of the screen shows the lighting settling after the page loads.
How the camera forms the picture
The camera traces one ray per pixel through the scene, through the glass and off the gold and the board, and reads the stored light where each ray lands. Each frame is drawn at less than the screen's resolution and shifted by a fraction of a pixel. Combining successive frames produces a sharp image at full resolution.
Depth of field is added afterwards, based on how far away the surface in each pixel is, in the way a real lens blurs what is nearer or farther than its focus. Reflections in the board are blurred according to the distance of the reflected image, which lies behind the surface as it does in a mirror. A reflection can therefore be blurred where the board itself is sharp. The lens focuses automatically on the nearest object close to the centre of the view and moves its focus there gradually. Double-tapping or double-clicking a spot focuses there instead and turns autofocus off until you reload the page.
Controls
Requirements
The page needs a browser with WebGPU, which lets web pages use the graphics chip. That means a recent version of Chrome or Edge, or Safari 26 or later (iOS 26 or later on iPhone and iPad). Phones can run it, more slowly and at a lower resolution.
The chess pieces are Chess Set by Riley Queen, from Poly Haven (CC0). The lamp, wine glass and board are built from simple geometric shapes.