Reflections: the stand-in reads the last whole depth too (white eyes before a window) #233

Closed
github-bot wants to merge 0 commits from github-bot/gh-233 into main AGit
Owner

@⁠uhuhuhuhuhuhuhuh on GitHub · 2026-11-30 23:54 UTC · original
uhuhuhuhuhuhuhuh:kept-depth → main · +61 −4 · 1 files · 47 commits · closed without merging

What it fixes

In dark rooms with a window, a character standing before the window gets white glowing eyes and a pale face, in some views and some runs. Seen in v0.8.2 on an RTX 3070 Ti with ray tracing off (the estimate standing in for reflections).

Cause

The title's miss program (the opaque layer) runs while the frame's depth is still being drawn. What is drawn later, the characters among it, is missing from the depth the reflections' stand-in reads. Before a window those texels read as sky, reflect_light leaves them alone, and they keep the sky's raw light. Whether a character is in the depth by then depends on the order of the frame's lists, hence only some runs.

Change

One file, crates/victory-gpu/src/ambient.rs:

  • The diffuse stand-in (after the probes' temporal resolve) runs when the depth is whole. One more dispatch there (keep_depth) copies the depth it reads into a buffer of ours.
  • seen() of the reflections' stand-in takes the nearer of the frame's own depth and the kept one, where the kept depth is of the same size and of this frame or the two before.
  • Up to 2560x1440 (a 14.7 MB buffer). A larger depth is not kept and nothing changes.
  • VICTORY_AMBIENT_SPECULAR_KEPT_DEPTH=0 switches it off. It is a toggled! switch, so VICTORY_AB can flip it in a diagnostics build. It is on by default; say so if you would rather have it off unless set.

Measured

RTX 3070 Ti (8 GB). The supported build, Series X profile, 2560x1440 output, DLSS Quality, the launcher's switch set of v0.8.2, a diagnostics build of 7281175 plus this change.

  • VICTORY_AB=7,VICTORY_AMBIENT_SPECULAR_KEPT_DEPTH, a picture of the screen every 5 s, a dark room with the character before a window, two runs: white eyes in 5 of 5 pictures with it off, in 0 of 3 with it on. From the front, away from the window, the eyes are natural either way.
  • Frame time by phase in the first run (about 6,500 draws a frame): median 68.9 ms on, 68.0 ms off, 12 phases each (66.7 to 71.7 and 65.8 to 71.4). No difference beyond the spread.

Not tested: other cards, the Series S profile, a 4K output, frame generation, long sessions.

Checks

  • cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with --all-features: clean.
  • cargo test: victory-gpu 471 passed; the workspace without victory-shader 821 passed in 25 programs.
  • Three victory-shader tests fail on my PC with and without this change (emit::barycentric_tests::first_half_values_render_on_hardware_and_warp, emit::rect::tests::the_rectangle_stage_is_a_geometry_shader, emit::rect::tests::rectangles_are_drawn_whole: "Container part 'Pipeline State Validation' does not match expected for module", from the local DXIL validator). That crate is not touched and does not depend on victory-gpu.
  • cargo xtask policy: passes.

Nothing from the game is in this pull request. The same change has run since 2026-11-30 in my fork of fxceless/victory-fork (https://github.com/uhuhuhuhuhuhuhuh/VIctory, branch eyes-fix).

🤖 Generated with Claude Code

**@⁠uhuhuhuhuhuhuhuh** on GitHub · 2026-11-30 23:54 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/233) `uhuhuhuhuhuhuhuh:kept-depth` → `main` · +61 −4 · 1 files · 47 commits · closed without merging ## What it fixes In dark rooms with a window, a character standing before the window gets white glowing eyes and a pale face, in some views and some runs. Seen in v0.8.2 on an RTX 3070 Ti with ray tracing off (the estimate standing in for reflections). ## Cause The title's miss program (the opaque layer) runs while the frame's depth is still being drawn. What is drawn later, the characters among it, is missing from the depth the reflections' stand-in reads. Before a window those texels read as sky, `reflect_light` leaves them alone, and they keep the sky's raw light. Whether a character is in the depth by then depends on the order of the frame's lists, hence only some runs. ## Change One file, `crates/victory-gpu/src/ambient.rs`: - The diffuse stand-in (after the probes' temporal resolve) runs when the depth is whole. One more dispatch there (`keep_depth`) copies the depth it reads into a buffer of ours. - `seen()` of the reflections' stand-in takes the nearer of the frame's own depth and the kept one, where the kept depth is of the same size and of this frame or the two before. - Up to 2560x1440 (a 14.7 MB buffer). A larger depth is not kept and nothing changes. - `VICTORY_AMBIENT_SPECULAR_KEPT_DEPTH=0` switches it off. It is a `toggled!` switch, so `VICTORY_AB` can flip it in a diagnostics build. It is on by default; say so if you would rather have it off unless set. ## Measured RTX 3070 Ti (8 GB). The supported build, Series X profile, 2560x1440 output, DLSS Quality, the launcher's switch set of v0.8.2, a diagnostics build of `7281175` plus this change. - `VICTORY_AB=7,VICTORY_AMBIENT_SPECULAR_KEPT_DEPTH`, a picture of the screen every 5 s, a dark room with the character before a window, two runs: white eyes in 5 of 5 pictures with it off, in 0 of 3 with it on. From the front, away from the window, the eyes are natural either way. - Frame time by phase in the first run (about 6,500 draws a frame): median 68.9 ms on, 68.0 ms off, 12 phases each (66.7 to 71.7 and 65.8 to 71.4). No difference beyond the spread. Not tested: other cards, the Series S profile, a 4K output, frame generation, long sessions. ## Checks - `cargo clippy --workspace --all-targets --locked -- -D warnings`, and the same with `--all-features`: clean. - `cargo test`: victory-gpu 471 passed; the workspace without victory-shader 821 passed in 25 programs. - Three victory-shader tests fail on my PC with and without this change (`emit::barycentric_tests::first_half_values_render_on_hardware_and_warp`, `emit::rect::tests::the_rectangle_stage_is_a_geometry_shader`, `emit::rect::tests::rectangles_are_drawn_whole`: "Container part 'Pipeline State Validation' does not match expected for module", from the local DXIL validator). That crate is not touched and does not depend on victory-gpu. - `cargo xtask policy`: passes. Nothing from the game is in this pull request. The same change has run since 2026-11-30 in my fork of fxceless/victory-fork (https://github.com/uhuhuhuhuhuhuhuh/VIctory, branch `eyes-fix`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The title's miss program runs while the frame's depth is still being drawn. Where a character, drawn
later, stands before a window, the depth read then says sky: the estimate leaves those texels alone
and they keep the sky's raw light (white glowing eyes and a pale face in a dark room with a window, in
some views and some runs).

The diffuse stand-in's program runs when the depth is whole. Its depth is now copied into a buffer of
ours (keep_depth, one dispatch), and the reflections' stand-in takes the nearer of that and the
frame's own depth where the kept one is of the same size and of this frame or the two before. Up to
2560x1440 (14.7 MB of card memory); a larger depth is not kept and nothing changes.
VICTORY_AMBIENT_SPECULAR_KEPT_DEPTH=0: the frame's own depth alone, as before.

Measured on an RTX 3070 Ti (8 GB): Series X profile, 2560x1440
output, DLSS Quality, the launcher's switch set of v0.8.2. The switch on and off by turns of 7 s inside
one run (VICTORY_AB), a picture of the screen every 5 s, in a dark room with the character before a
window, two runs: white eyes in 5 of 5 pictures with it off, in 0 of 3 with it on. Frame time by
phase in the first run: median 68.9 ms on, 68.0 ms off (12 phases each; 66.7 to 71.7 and 65.8 to
71.4).

Clippy clean in both CI forms. Tests: victory-gpu 471 passed; the workspace without victory-shader
821 passed in 25 programs. Three victory-shader tests fail here with and without the change
(DXIL validation by the local validator: "Container part 'Pipeline State Validation' does not match
expected for module"); that crate is not touched and does not depend on victory-gpu.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 23:55:55 +00:00
github-bot closed this pull request 2026-12-01 01:10:37 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 01:08 UTC · original

Hi, and thanks for the report.

This repository is public, and to keep the project safe nothing posted here may name or identify the game, or point to where copies come from. Could you please edit the following, removing:

  • @⁠uhuhuhuhuhuhuhuh, your pull request description: the game executable's file name and the build number (write <exe> and "the supported build" instead).

Once it is edited, we clear the old revisions from the post's edit history on our side.

Technical details (GPU, settings, errors, the log with the game folder replaced) are very welcome. See the issue template for what helps. Thank you!

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 01:08 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/233#issuecomment-7297141747) Hi, and thanks for the report. This repository is public, and to keep the project safe nothing posted here may name or identify the game, or point to where copies come from. Could you please edit the following, removing: - @⁠uhuhuhuhuhuhuhuh, your pull request description: the game executable's file name and the build number (write `<exe>` and "the supported build" instead). Once it is edited, we clear the old revisions from the post's edit history on our side. Technical details (GPU, settings, errors, the log with the game folder replaced) are very welcome. See the issue template for what helps. Thank you!
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-12-01 01:36 UTC · original

A note on why this shows as closed: GitHub closed every open pull request by itself when main's history was rewritten on 2026-12-01 (text-only changes; every commit hash changed), and they cannot be reopened. This is not a rejection.

Your change is in the batch being tested for the next release, carried over as one commit with you as its author. Nothing is needed from you now; the result will be posted here.

**@⁠readmet3xt-lab** on GitHub · 2026-12-01 01:36 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/233#issuecomment-7297689825) A note on why this shows as closed: GitHub closed every open pull request by itself when main's history was rewritten on 2026-12-01 (text-only changes; every commit hash changed), and they cannot be reopened. This is not a rejection. Your change is in the batch being tested for the next release, carried over as one commit with you as its author. Nothing is needed from you now; the result will be posted here.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.