Reflections: the alpha layer's miss program runs again (blocks on glass) #2534

Closed
github-bot wants to merge 1 commit from github-bot/gh-2534 into main AGit
Owner

@⁠unueberlegt on GitHub · 2026-11-29 13:55 UTC · original
unueberlegt:fix/raymiss-alpha-kept → main · +38 −8 · 1 files · 1 commits · closed without merging

What this changes

The reflections' miss program is left out only for opaque surfaces now. The alpha layer's (glass) runs again, kept as water's is. The opaque skip that fixed the white grain on floors stays.

Why

e2d7854e left the program out for opaque and transparent surfaces, keeping only water's running, "without them its reflections hold earlier frames' bytes". Glass is the same case: its screen-space march rarely resolves what it looks at. With the program left out, a window's unresolved rays have no fill at all — no sky (the skip), and no estimate either (ambient(Role::Miss) never runs; the skip returns before it) — so the reflection target holds earlier frames' bytes: flickering rectangular red/green/blue/purple blocks, #2440's screenshots.

Why it only appeared between f9dfb76 and 829188e9

The skip has been in the tree since e2d7854e, which f9dfb76 already contains. But its surface-layer lookup only resolves the miss program's first root constant since the root bindings of #1204 changed the slots — on f9dfb76 the lookup failed, every dispatch ran the program, and glass was given the sky. #2440's own logs confirm it: the f9dfb76 session has no "miss program left out" line (the program ran); on 829188e9 it fires in every stock run. Their run matrix agrees: the three runs where the line fired show the blocks, the three VICTORY_RAYMISS_KEEP=1 runs (line absent) show clean windows.

VICTORY_RAYMISS_KEEP=1 stays the escape hatch for everything, as before.

Testing

  • New miss_program_kept_tests::only_opaque_is_left_out: opaque left out (the white-grain fix), alpha and water kept, an unknown layer runs the program.
  • cargo test -p victory-gpu --lib: 915 passed, one failure (a_change_is_saved_at_once) is the known parallel-run flake class, 2/2 green in isolation.

Fixes #2440

🤖 Generated with Claude Code

**@⁠unueberlegt** on GitHub · 2026-11-29 13:55 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2534) `unueberlegt:fix/raymiss-alpha-kept` → `main` · +38 −8 · 1 files · 1 commits · closed without merging ## What this changes The reflections' miss program is left out only for **opaque** surfaces now. The alpha layer's (glass) runs again, kept as water's is. The opaque skip that fixed the white grain on floors stays. ## Why e2d7854e left the program out for opaque *and* transparent surfaces, keeping only water's running, "without them its reflections hold earlier frames' bytes". Glass is the same case: its screen-space march rarely resolves what it looks at. With the program left out, a window's unresolved rays have no fill at all — no sky (the skip), and no estimate either (`ambient(Role::Miss)` never runs; the skip returns before it) — so the reflection target holds earlier frames' bytes: flickering rectangular red/green/blue/purple blocks, #2440's screenshots. ## Why it only appeared between f9dfb76 and 829188e9 The skip has been in the tree since e2d7854e, which f9dfb76 already contains. But its surface-layer lookup only resolves the miss program's first root constant since the root bindings of #1204 changed the slots — on f9dfb76 the lookup failed, every dispatch ran the program, and glass was given the sky. #2440's own logs confirm it: the f9dfb76 session has no "miss program left out" line (the program ran); on 829188e9 it fires in every stock run. Their run matrix agrees: the three runs where the line fired show the blocks, the three `VICTORY_RAYMISS_KEEP=1` runs (line absent) show clean windows. `VICTORY_RAYMISS_KEEP=1` stays the escape hatch for everything, as before. ## Testing - New `miss_program_kept_tests::only_opaque_is_left_out`: opaque left out (the white-grain fix), alpha and water kept, an unknown layer runs the program. - `cargo test -p victory-gpu --lib`: 915 passed, one failure (`a_change_is_saved_at_once`) is the known parallel-run flake class, 2/2 green in isolation. Fixes #2440 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The miss program is left out only for opaque surfaces now. The alpha
layer's (glass) is kept, as water's is: its screen-space march rarely
resolves what it looks at, so without the program its reflections held
earlier frames' bytes, and whole windows came out as flickering blocks
of them (#2440). The opaque skip that fixed the white grain on floors
stays.

The pass had been in the code since e2d7854e, but its layer lookup
resolves the miss program's root constant only since the root bindings
of #1204: until then every dispatch ran the program, and glass showed
the sky it was given. Windows that updated to the batch saw the blocks
where the builds before saw the sky.

Fixes #2440

Co-Authored-By: Claude Code <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 13:55:53 +00:00
github-bot closed this pull request 2026-11-29 14:07:04 +00:00
Author
Owner

@⁠unueberlegt on GitHub · 2026-11-29 14:03 UTC · original

Closing this: #2464 built exactly this change (a local build that runs the alpha layer's program and leaves out only MISS_OPAQUE) and glass stays noisy there — the layer constants do not split glass from the floors, since one dispatch of the miss program fills the whole half-size target with sky before CS_ResolveScreenSpace writes over it. I have corrected my comment on #2440 accordingly. The direction worth taking is #2464's own (its section 1): give the dispatch's output MISS_LIGHT zero or the stand-in estimate instead of leaving the dispatch out, so the texels the screen-space resolve does not cover hold "no reflection" instead of earlier frames' bytes. The opaque skip that fixed the floors stays as it is.

**@⁠unueberlegt** on GitHub · 2026-11-29 14:03 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2534#issuecomment-7257006374) Closing this: #2464 built exactly this change (a local build that runs the alpha layer's program and leaves out only MISS_OPAQUE) and glass stays noisy there — the layer constants do not split glass from the floors, since one dispatch of the miss program fills the whole half-size target with sky before CS_ResolveScreenSpace writes over it. I have corrected my comment on #2440 accordingly. The direction worth taking is #2464's own (its section 1): give the dispatch's output MISS_LIGHT zero or the stand-in estimate instead of leaving the dispatch out, so the texels the screen-space resolve does not cover hold "no reflection" instead of earlier frames' bytes. The opaque skip that fixed the floors stays as it is.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2534
No description provided.