Skip to content

Cleanup: experiments and switches that outlived their measurement - #63

Merged
yujiaxu-ops merged 2 commits into
mainfrom
live-cleanup
Nov 13, 2026
Merged

yujiaxu-ops merged 2 commits into
mainfrom
live-cleanup

Conversation

@yujiaxu-ops

@yujiaxu-ops yujiaxu-ops commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Step 1 of the consolidation agreed on 2026-11-13: remove what was measured and left off, before the harness moves into the repo and the data layout is restructured. Nothing a scene shows changes.

Removed

  • The temporal pass's two round-3 experiment switches (THREERT_TEMPORAL_FLAGS 1 and 2) and the flag word that carried them (LiveParams.mode.w, now unused).

  • The emitter-reservoir experiment (THREERT_RESTIR, ReSTIR DI at camera hits). It was measured and left off: first-frame SSIM 0.608 → 0.613, motion +0.1 ΔE, +0.44 ms. Removed with it:

    • its kernel code and the helpers only it used;
    • the reservoir buffer (group 1, binding 4);
    • five vec4 of Params and the F_RESTIR bit.

    The kernel now binds 19 storage buffers as written, and the merged layout's MergedLive has six arrays.

  • Five A/B and override switches:

    • THREERT_NO_MV: no per-object motion vectors.
    • THREERT_LT_DYNAMIC=0: emitters added in place by power share. bench-voxel-light's third row goes with it.
    • THREERT_EMIT_SYNC: unreferenced.
    • The overrides of three constants: THREERT_EMITTER_CULL, THREERT_EMITTER_CULL_VIEW, THREERT_LIGHT_LOD.

Kept

  • What the benches and tests use: THREERT_PROFILE, _PROFILE_BLAS, _FREEZE_TIME, _EXPOSURE_SNAP, _NO_GRAIN, _MOTION_BLUR, _EDIT_REBUILD, _INSTANCING.
  • Diagnostics: _EDIT_LOG, _VIEW_MODE, _TL_HIDE, _CACHE, _CACHE_FLAGS.
  • Configuration: _GOVERN_CLOCK, and _RASTER (the primary-visibility path kept for devices without hardware ray tracing).

The other renderer files have about twenty more switches; they are not reviewed here.

Checked

  • test-render, native layout: main run twice and this build run twice, every output compared byte for byte.
    • Every output a run repeats to the byte is byte-identical to main's.
    • The fifteen or so that differ between two runs of one build (async emitter builds, physics, skinning, media) differ here within that.
  • test-render with THREERT_MERGED=1 (the browser layout, natively):
    • The same 166 pass and the same 24 fail as on main.
    • One volume test differs at a relative 2e-6: the kernel is compiled from a shorter source.
  • cargo test --release --locked 124 + 2 (the merged tests count one buffer fewer), npm test 159, typecheck clean.

Found on the way, not touched here

On main, 24 tests fail in the merged (browser) layout: particles, GPU particles, translucency order and depth, volume lighting, wind sway, surface windows. They fail identically before and after this change.

🤖 Generated with Claude Code


Note

Low Risk
Mechanical deletion of disabled code paths with documented byte-identical test-render parity; no change to default scene output.

Overview
Removes live-renderer experiment code and env overrides that benchmarks showed were not worth keeping, so default rendering and tests stay unchanged while the shader/kernel surface area shrinks.

ReSTIR DI at camera hits (THREERT_RESTIR) is deleted end-to-end: large blocks in pathtrace.wgsl, the resv group-1 buffer and bind layout, related Params fields, and LiveCore wiring. Emitter direct lighting always uses the existing RIS/CDF path again. The merged layout drops one MergedLive array (six instead of seven; kernel 19 storage buffers).

Temporal round-3 toggles (THREERT_TEMPORAL_FLAGS) and live.wgsl's xflag path are removed; à-trous noise gating and specular filter reach stay on the shipped logic only.

Other retired switches bake in the measured defaults: per-object motion vectors always on, light LOD / emitter cull constants fixed in Rust, async emitter worker no longer gated by sync/lt-dynamic flags, and bench harnesses stop treating removed THREERT_* keys as part of the ref cache key.

docs/ROADMAP.md documents what was removed vs kept for benches/diagnostics.

Reviewed by Cursor Bugbot for commit 3b84760. Bugbot is set up for automated code reviews on this repo. Configure here.

yujiaxu-ops and others added 2 commits November 13, 2026 19:28
…ERT_TEMPORAL_FLAGS go

Switch 1 (a-trous gated by history length alone) and switch 2 (the specular spatial filter on mirror-like surfaces
too) were measured and left off in round 3; the flag word that carried them (`LiveParams.mode.w`) is unused now.
test-render: every output a run repeats to the byte is byte-identical to main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ived their measurement go

Removed, all off by default:
- THREERT_RESTIR: the ReSTIR DI experiment (measured and left off: k = 1 0.608 to 0.613, motion +0.1 dE,
  +0.44 ms). Its kernel code, the reservoir buffer (group 1 binding 4), five vec4 of Params and the F_RESTIR bit;
  the merged layout's MergedLive has six arrays, the kernel 19 storage buffers as written.
- THREERT_NO_MV, THREERT_LT_DYNAMIC (bench-voxel-light's power-share row with it), THREERT_EMIT_SYNC, and the
  overrides of EMITTER_CULL, EMITTER_CULL_VIEW and LIGHT_LOD_D0.

test-render: every output a run repeats to the byte is byte-identical to main's; in the merged layout
(THREERT_MERGED=1) one volume test differs at a relative 2e-6. cargo test 124 + 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yujiaxu-ops
yujiaxu-ops merged commit ac4e8b6 into main Nov 13, 2026
9 checks passed
yujiaxu-ops added a commit that referenced this pull request Nov 13, 2026
…t stale in the docs corrected (#66)

CI's renderer job built the renderer and ran none of its ~130 unit tests, though all but a few need no GPU. It now
runs `cargo test --release --locked` after the build: on the runner, which has no GPU, the seven tests that open a
device say "skipped" and return (checked on a Mac with no adapter: 124 pass, those seven among them). The job is
named for it; no check is required by name.

The cleanup (#63, the reservoirs out) and the buffer layout (#65, 28 -> 24 live storage buffers, one bind group)
left docs/RUNTIME.md describing the kernel's 20 and the live passes' 28 storage buffers, seven group-1 buffers with
the reservoirs, the history's two bind groups; merged.rs and gpu.rs comments had the old counts.

ROADMAP "Known issues": under software traversal 24 tests fail on main now, the 23 recorded and
wind/pivot-sway-live (9.241 for 10; hardware traversal passes it). WORKFLOW.md says software traversal is in no gate.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant