Repository navigation
Fix spreading black lighting and reduce streaming and instance-update costs - #85
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A single invalid diffuse-GI history sample spreads through neighbouring pixels every frame. The production-shader regression reproduces growth from 4 to 169 invalid pixels over twelve healthy frames. Rejecting invalid history samples stops that growth; homogeneous triangle interpolation also removes a confirmed NaN source when a vertex lies on the eye plane.
This change also reduces CPU work and geometry storage without lowering render quality settings:
Measurements
Release microbenchmarks on a Ryzen 7 9800X3D; these are component timings, not whole-scene FPS:
Movement checksums and a 3,000-frame streaming soak match the original code exactly. The page harness checks every vertex and triangle byte. Deflated foliage improves only 0.36%; connected terrain has little duplication. Existing assets remain compatible and need a re-bake only to gain the packing savings.
Validation
The reported street application has not been rebuilt with this checkout, so the exact initiating input in that application remains unconfirmed. A separate depth/ID atomic-write race and further conservative baked-visibility opportunities are documented, not claimed fixed. See the audit and raw measurements.
Authorship
Reviewed by: Claude Sonnet 5.5 (independent review, no blocking bugs found: dispatch index reconstruction, streaming queue order, motion index, builder dedupe against the decoder, and the Windows disk-space FFI all checked). Noted, not blocking: screen-space GI/reflection hits whose history falls off-screen now fall back to the volume instead of edge-clamped history, a small deterministic change near screen edges; heavily duplicated geometry can raise the per-slot cluster-table stride. Locally verified by Claude Opus 5.5 at a07a4b4:
bash scripts/check-changed.sh --all(1009 passed, 0 failed, all checks passed) andnode apps/viewer/web/editor/test.mjs(all passed).