ShadyTracer Open ShadyTracer

Physically based light, in your browser

A WebGPU path tracer that renders in real units, candela per square metre and lux, with a scene builder, a measuring tool, and an optics bench for LED and luminaire design that traces the same scene the picture shows. Nothing to install and no server: it runs on your own graphics card.

The raytracer in its Design layout: the project's scenes as cards over the tree on the left; in the middle a light sculpture, blue and amber light bars and a mirror ball in a plaster room, its light seen through the photon map; the Render settings and Render stats on the right

Who makes it, and why

I'm Matthijs Keuper, an applied physicist who has worked mostly in the lighting industry: Philips Lighting, Lumileds, and Invisua Lighting, which I founded. Today I consult on system architecture and LEDs at Keuper Innovations, and make art at code+wood.

I have built ray tracers for my art for years. ShadyTracer is the one I always wanted: physically correct (reasonably so: you probably should not use it to design camera lenses) and built entirely on signed distance functions (iquilezles.org is the rabbit hole). I started it on my own TinyWebGPU toolkit.

How it is made

I wrote the foundations of ShadyTracer myself, but used Claude Code to finish it. I decide what it does and how it should work. Claude Code writes under my direction: I set the goals, review what comes back and measure it on real hardware. A process of many iterations.

So should you trust the output? Whether you can trust a renderer depends not on who typed it, but on what checks it. So ShadyTracer is built to be checked:

  • Every ✓ on this page is a measurement: a test with a closed-form answer, a white floor under the sun or a sphere that should vanish in uniform light, run in the app on a real graphics card. Each is one button in the app's Tests panel, so you can run them yourself, and the results are recorded with the hardware they ran on.
  • Every change is tested before it goes in: 115 test files run automatically on every push, covering the light units, the error bars, the colour science, the photon map, the optics statistics, the scene builder and more. Every shader kernel is built against every scene and checked, 8,167 builds, without a graphics card. Another 44 tests run the renderer in a headless browser or on a software GPU.
  • Nothing is claimed that has not been shown. FEATURES.md lists every feature with its evidence. What is built but not yet confirmed on real hardware is marked preview, here and there.

Why sponsor

ShadyTracer is free and stays free. A tip pays for hardware to test on, and tells me the work is useful to someone, which keeps me motivated.

What it does

A renderer that treats light as something to measure, and a workshop to build what it lights. ✓ checked against a closed-form answer on a real graphics card · preview built and tested without one, not yet confirmed on one · unmarked: in use.

Light found the way light goes

  • Wavefront path tracing on the GPU, with next-event estimation and multiple importance sampling toward the sun and sky: 3.8× less noise, unbiased ✓
  • Caustics through glass, by tracing photons from the sun and learning where they are worth sending ✓; and what is seen through glass or in a mirror, lit right, by a photon map.
  • Any glowing surface is a light, with nothing declared ✓
  • Dust in the air: a haze box whose air scatters light in real units, so a beam shows in it; it loses no light, to 0.02 % ✓
  • Glass the way glass behaves: dispersion, dichroic and anti-reflection coatings, and a camera lens with depth of field
The Material board example: the library's materials on spheres in daylight -- plastics, metals, clear, tinted and frosted glass, stone, wood and paint -- beside the Render settings and Render stats

Light as numbers

Luminance in cd/m² and illuminance in lux, everywhere. A white floor under sun and sky reads its textbook value to 0.1 % ✓. The sun is its illuminance at its real size, the sky the light it puts on the ground.

  • Lux and luminance as false colour, with an error bar on every pixel
  • A measure tool: pins and areas read lux, uniformity U0 and colour temperature off any surface, a ruler measures distances, all of it as CSV
The LED, lens and screen example measured: an area and a pin on the screen read in cd/m² with their error, colour temperature, Duv and Δu′v′; the optics rays drawn over the picture, and the drawer of views, measuring tools and rays at its bottom right

Every shape is code

The scene builder makes shapes from signed distance fields, each one code you can edit, with compile errors shown at your own line and column. Move handles in the picture, CSG, modifiers, undo; projects of several scenes, kept in your browser as they change.

  • STEP and STL parts imported as shapes, exact, with analytic normals
  • 3MF with colour for multi-colour 3D printing, straight from the scene
The builder: dichroic glass plates, flint-glass spheres and a light in dusty air; one plate selected, with the Transform gizmo's arrows, planes, arcs and stretch cubes in the picture, the numbers panel at the top right, and its properties and code beside it

Surfaces with relief

Plaster, knockdown stucco, sand-float render, rough stone, hammered metal, leather, orange-peel paint: a noise library for surfaces (value, gradient, fBm and Worley noise) displaces them, each noise with a proved or measured bound on its slope, so a displaced surface never lets the march step through it.

Any material field can be code; brushed, turned and radial grain along the surface ✓.

A copy of the Relief and texture example: plaster, knockdown stucco, sand-float render, rough stone, hammered metal and leather on panels in a raking sun, and a sphere in orange-peel paint; the scene's own settings in Properties

A library to start from

43 built-in items (shapes, modifiers, lights and material presets) and 42 named materials, from plastics, paints and plaster to brushed, anodised and hammered metal, clear, tinted, frosted and flint glass, stone, wood and leather. Five optics parts too: a PMMA lens, an LED die, a detector screen, a prism and a whole LED–lens–screen bench. Keep your own items beside them, and drag any of them onto the tree or into the picture.

The Library beside the Product shot example: shapes, modifiers, lights and materials as rendered pictures, with search, filters and tags; the perfume bottle selected in the picture

Animation and video

Keyframe any live setting (the camera, the sun, a light's flux, an object's position) and render it frame by frame to MP4 or GIF, each frame offscreen at the export size with its own samples.

The Animate layout on the Glass and liquid example: three camera tracks keyed in the Timeline under the picture, and the video's 1920 × 1080 frame drawn over it

For lighting and optics design

An optics bench over the same scene: a non-sequential Monte Carlo trace through the geometry and materials the picture uses, so the numbers and the picture cannot disagree. Rays are weighted, never discarded; every lumen is booked, emitted = escaped + lost + absorbed, to zero; and every number carries its standard error.

An LED package modelled in the builder, its chip, silicone dome and gold leads, with the optics trace's rays drawn over the picture The Analyse layout on the RGBW colour mixing example: ten million rays coloured by their light, the illuminance map on the screen with isolux lines, its profiles, the polar diagram and the results; Run, Live and Σ at the top of the Analysis pane
  • Refraction, Fresnel and total internal reflection match the textbook within two standard errors ✓
  • Sources: rectangle and disc lights in lumens or cd/m², Lambertian, cosⁿ, cones and collimated beams; colour as RGB, CCT + Duv or CIE xy; Zemax ray files preview
  • The optics sources light the picture at their real brightness: a lens's spot on a screen shows in lux ✓
  • See the rays, retraced live while you move things; Live analysis that follows every edit
  • Far field: intensity in cd or cd/klm on a type C grid, beam and field angles, I max, efficiency, zonal flux, a polar diagram
  • Illuminance maps in lux on a detector: isolux lines, profiles, U0 and Ud, encircled flux, a virtual plane at any distance
  • Colour: CIE xy, u′v′, CCT and Duv, Δu′v′ uniformity, single lights exact to 10⁻⁸ ✓; colour mixing to a target
  • Export: the intensity table, the illuminance map and the hits as CSV, any chart as PNG

Checked against known answers

Every ✓ comes from a test with a closed-form answer, run in the app on a real graphics card: one button each in its Tests panel. A few of them:

testwhat must holdresult
photometrya white floor under sun and sky reads ρE/π0.9984–1.0001 on ten rows
furnacea white sphere in uniform light vanishesevery material 1.000 to 0.04 %
ltlight tracing moves the noise and never the meanwithin 0.03 %
hazealbedo-1 dust in the air loses no lightwithin 0.024 %
optics-refractiona slab at 0, 45 and 70°, total internal reflection, a ball, a wedgewithin two standard errors; the wedge to 2 × 10⁻⁶ °
optics-lightan optics source lights the picture at its real brightnessthree LEDs mixed to 4000 K read 3999.9 K

All of them, with the hardware each ran on: the README and TESTING.md; every feature with its evidence: FEATURES.md.

Open source

ShadyTracer is free and open source under the MIT licence: the renderer, the builder, the optics bench, the tutorial and every test. No build step and no dependencies to install: clone it, serve the folder, open it.

Questions

What do I need to run it?

A browser with WebGPU: Chrome or Edge 113 or later, Firefox 141 or later on Windows, or Safari 26 or later. And a real graphics card: the results here were measured on NVIDIA cards. The line under the button at the top of this page says whether your browser can run it.

Do I need to install anything?

No. Open the app and it runs in the browser, on your own graphics card. There is no account, no download and no server doing the work.

Where is my work kept?

In your browser, on this computer, saved as it changes: a reload comes back to the same scene, camera and settings. The Project panel lists your projects and downloads any of them, and File › Export saves a scene or a whole project as a file. Clearing the browser's data for this site deletes them, so keep a file of anything you care about.

Is anything uploaded?

No. Your scenes stay in your browser. The page loads its own files from this site and sends nothing anywhere: no account, no analytics, no tracking.

Does it work on a phone or tablet?

It is made for a desktop or laptop with a graphics card: the interface is a workbench of docked panels, and path tracing wants a graphics card's power. A phone browser with WebGPU may start it, but that is not what it is built or tested for.

Is it free?

Yes. ShadyTracer is open source under the MIT licence, and the code is on GitHub. If it is useful to you, a tip through GitHub Sponsors keeps it going.

What do ✓ and preview mean on this page?

✓ means checked against a closed-form answer on a real graphics card, with the test that did it. Preview means built and tested without a graphics card, and not yet confirmed on one. Anything unmarked is in use.

Open ShadyTracer