Home / Demos / Path tracing graded by physics

GPU MuTracer 0.1.1 · Chromium 140 WebGPU · NVIDIA GPU slice

Path tracing graded by physics

The agent writes only scene.json: spheres with OpenPBR materials, a floor, lights, a camera and a procedural sky. A trusted browser harness renders it with the MuTracer WebGPU path tracer in full Chromium on a GPU slice. The judge does not trust the picture: it renders a white furnace whose exact answer is pixel = albedo, bounds the energy every material reflects, checks that error falls like 1/sqrt(samples), demands byte-identical HDR output for the same seed, and only then checks exposure and noise on the agent's own image.

Real GPU renders of the known-good example scene at 1 to 256 samples per pixel, with the measured error falling along 1/sqrt(spp), then the judge's verdict. Made from real judge output, no illustrative data.

Measured

0.1795 / 0.4985 / 0.7976
white-furnace render for albedo 0.18 / 0.5 / 0.8
within 0.017–0.025 of exact
−0.485
convergence slope of error vs samples
ideal −0.5, pass −0.65 … −0.35
identical
final HDR hash across 3 fresh leases
same seed → same bytes
0.616 / 0.5 %
median luminance / clipped pixels
0.08–0.85 / ≤ 10 %
8/8
known-bad artifacts rejected
self-test, ≥ 90 % required

reproduced Independently reproduced by another model family: identical verdict and byte-identical HDR buffer. Numbers from the demo's README and receipt.

Ask your agent

With the sandbox plugin or any agent that can use a sandbox, paste:

Use an agent-next GPU `browser` sandbox (a GPU lease, `vram_gb: 2`) through the public REST API. Clone https://github.com/agent-next/sandbox at ref `main` locally and read `cookbook/render-pathtrace/SPEC.md`. The lease is offline, so the included run.py fetches the pinned MuTracer package on your machine, verifies it, and uploads it with the trusted judge. Design `scene.json` (not JavaScript): three to five OpenPBR spheres with distinct materials, a floor, a camera, a procedural environment and rect or sphere lights. Do not edit judge/. Grade with `--backend gpu --seed 17`, read the numeric failures, and iterate until every gate passes. Report the adapter, furnace means, convergence slope and image metrics, then delete the lease and confirm GET returns 404.

Or run it yourself

Creates a sandbox, installs the pinned tools, runs the judge's self-test, grades the known-good example, prints the verdict and kills the sandbox.

pip install "git+https://github.com/agent-next/sandbox#subdirectory=cli"
export SBX_API_KEY=<your key>  # from the console
git clone --depth 1 https://github.com/agent-next/sandbox && cd sandbox
python3 cookbook/render-pathtrace/run.py
Inside a prepared GPU browser lease: the judge alone
# from cookbook/render-pathtrace/
export SBX_RENDER_BACKEND=gpu SBX_RENDER_ARCHIVE=<uploaded mutracer-0.1.1.tgz>
sh judge/setup.sh
sh judge/selftest.sh --backend gpu --seed 17
sh judge/grade.sh examples/good/scene.json --backend gpu --seed 17

Results

The 128-spp render, the white-furnace check against the exact answer, the convergence slope and the image-spec bands
The 128-spp render, the white-furnace check against the exact answer, the convergence slope and the image-spec bands. Full size
Self-test matrix: which check rejects each of the 8 bad scenes and the halved-albedo renderer control
Self-test matrix: which check rejects each of the 8 bad scenes and the halved-albedo renderer control. Full size

Why a sandbox

WebGPU path tracing needs a real GPU and a full browser. The GPU browser sandbox provides both on a 2 GiB slice of an NVIDIA Blackwell GPU, runs the untrusted scene offline, and is deleted and confirmed gone after every run.

Measured wall time

StepWall time
upload MuTracer + judge (offline lease)38–75 s
judge/setup.sh (offline, integrity-checked)~1 s
judge/selftest.sh (good + 8 mutants + renderer control)30–34 s
judge/grade.sh6–7 s
whole run, create → GET 404100–273 s

Limits, plainly

  • A 2 GiB lease is a requested VRAM slice, not an allocation-time cap: the host watchdog kills an over-limit lease.
  • G1 checks diffuse transport against the exact answer, not every OpenPBR lobe; G2 bounds mean reflected energy, not a directional maximum.
  • The CPU path (SwiftShader WebGPU) lost the device before any frame in every attempt; only the GPU backend is accepted.
  • Uploads run at about 0.1 MB/s through the public files route, so transfer, not rendering, dominates wall time.

Source

Demo folder · SPEC · RECEIPT · REPRODUCE — pinned at ba328e6

Run one yourself

Sign in with GitHub for a free key with 10 sandbox-hours. Every demo above finishes in minutes and kills its sandbox when it is done.