Add opt-in diffuse ambient floor when resolve depth is unavailable #204

Open
github-bot wants to merge 6 commits from github-bot/gh-204 into main AGit
Owner

@⁠t90 on GitHub · 2026-11-27 09:12 UTC · original
t90:pr/depth-free-ambient → main · +338 −17 · 3 files · 6 commits · open

When the diffuse screen-probe resolve is missing its expected depth SRV, the ambient stand-in skips that resolve and shaded surfaces can remain almost black. VICTORY_AMBIENT_FLAT=<level> provides an opt-in, slightly warm neutral diffuse minimum before materials are applied. It preserves brighter and saturated probe light. Valid-depth lighting keeps its existing path; incompatible depth views remain rejected.

The setting defaults off, requires the existing ambient stand-in and builder policy, accepts positive finite numbers capped at 2, and requires a restart. Set VICTORY_AMBIENT=1 and VICTORY_AMBIENT_FLAT=0.3 separately in the environment. The value is irradiance, not a percentage.

Following review, FLAT is built only when requested. Its setup failure leaves the existing ambient passes available; an unavailable flat pipeline leaves the missing-depth resolve unchanged before any command-root changes. A synthetic setup test rejects FLAT to verify failure isolation and checks that it is never attempted when disabled. A one-time depth-free ambient floor dispatch recorded message after the dispatch includes its size and level; it confirms command recording, not GPU completion.

This pass declares no depth SRV and fabricates no depth, normals, occlusion or traced lighting. The uniform minimum can flatten contrast and brighten areas that should remain dark. Probe replacement, gray lift, personal launchers and frame-generation changes are excluded.

Validation, distinguished by revision:

  • Latest conditional-pipeline fix: 11 focused ambient tests pass, including D3D12 WARP readback, disabled/rejected optional-pipeline setup, bright/saturated light, dispatch bounds, settings and routing. Default and all-feature workspace/all-targets Clippy pass with warnings denied. Asset policy and diff checks pass.
  • Preceding ambient revision: full default workspace tests passed offline and locked. Existing loopback/hard-link tests passed unchanged outside the sandbox. That full suite has not been rerun on the latest setup fix.
  • Earlier stacked ambient-plus-probe branch: the exact all-features serial workspace command failed in the unchanged replay test because the available Windows SDK compiler rejected ms_6_6. The run excluding that test passed. This is partial validation of that earlier stacked branch, not a pass of the exact command or latest isolated ambient revision.
  • All four remote Windows CI checks passed on ce5a2ee.

Ready for code review. The isolated floor-only recording remains pending; the maintainer has offered to compare ce5a2ee. Per review, compare the same RT-off scene with the floor off and at 0.3, with gray lift and probe replacement disabled, and confirm the missing-depth route and post-dispatch recording message in the enabled run. Existing clips combine several local lighting options and do not establish this patch’s isolated effect. Review complete recordings before reporting visual/performance results; keep recordings and game-derived data outside Git under the asset policy.

**@⁠t90** on GitHub · 2026-11-27 09:12 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204) `t90:pr/depth-free-ambient` → `main` · +338 −17 · 3 files · 6 commits · open When the diffuse screen-probe resolve is missing its expected depth SRV, the ambient stand-in skips that resolve and shaded surfaces can remain almost black. `VICTORY_AMBIENT_FLAT=<level>` provides an opt-in, slightly warm neutral diffuse minimum before materials are applied. It preserves brighter and saturated probe light. Valid-depth lighting keeps its existing path; incompatible depth views remain rejected. The setting defaults off, requires the existing ambient stand-in and builder policy, accepts positive finite numbers capped at 2, and requires a restart. Set `VICTORY_AMBIENT=1` and `VICTORY_AMBIENT_FLAT=0.3` separately in the environment. The value is irradiance, not a percentage. Following review, FLAT is built only when requested. Its setup failure leaves the existing ambient passes available; an unavailable flat pipeline leaves the missing-depth resolve unchanged before any command-root changes. A synthetic setup test rejects FLAT to verify failure isolation and checks that it is never attempted when disabled. A one-time `depth-free ambient floor dispatch recorded` message after the dispatch includes its size and level; it confirms command recording, not GPU completion. This pass declares no depth SRV and fabricates no depth, normals, occlusion or traced lighting. The uniform minimum can flatten contrast and brighten areas that should remain dark. Probe replacement, gray lift, personal launchers and frame-generation changes are excluded. Validation, distinguished by revision: - Latest conditional-pipeline fix: 11 focused ambient tests pass, including D3D12 WARP readback, disabled/rejected optional-pipeline setup, bright/saturated light, dispatch bounds, settings and routing. Default and all-feature workspace/all-targets Clippy pass with warnings denied. Asset policy and diff checks pass. - Preceding ambient revision: full default workspace tests passed offline and locked. Existing loopback/hard-link tests passed unchanged outside the sandbox. That full suite has not been rerun on the latest setup fix. - Earlier stacked ambient-plus-probe branch: the exact all-features serial workspace command failed in the unchanged replay test because the available Windows SDK compiler rejected `ms_6_6`. The run excluding that test passed. This is partial validation of that earlier stacked branch, not a pass of the exact command or latest isolated ambient revision. - All four remote Windows CI checks passed on `ce5a2ee`. Ready for code review. The isolated floor-only recording remains pending; the maintainer has offered to compare `ce5a2ee`. Per review, compare the same RT-off scene with the floor off and at `0.3`, with gray lift and probe replacement disabled, and confirm the missing-depth route and post-dispatch recording message in the enabled run. Existing clips combine several local lighting options and do not establish this patch’s isolated effect. Review complete recordings before reporting visual/performance results; keep recordings and game-derived data outside Git under the asset policy.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 09:14:48 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 09:19 UTC · original

@⁠t90 The missing-depth route fits the dark-surface case. I found one setup issue: make() builds FLAT with ? before checking the option, so a driver rejecting that pipeline would take the existing ambient pass with it. I’ve prepared conditional pipeline creation locally and reconciled both sections of the ray-tracing docs.

For the paired run, use a shot that reports the missing depth SRV and compare the same RT-off scene with the floor off and at 0.3. Confirm missing depth SRV: using the depth-free ambient floor in the second run. That isolates the new pass from the other lighting changes.

**@⁠TaynanGT** on GitHub · 2026-11-27 09:19 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7214549326) @⁠t90 The missing-depth route fits the dark-surface case. I found one setup issue: `make()` builds `FLAT` with `?` before checking the option, so a driver rejecting that pipeline would take the existing ambient pass with it. I’ve prepared conditional pipeline creation locally and reconciled both sections of the ray-tracing docs. For the paired run, use a shot that reports the missing depth SRV and compare the same RT-off scene with the floor off and at `0.3`. Confirm `missing depth SRV: using the depth-free ambient floor` in the second run. That isolates the new pass from the other lighting changes.
Author
Owner

@⁠t90 on GitHub · 2026-11-27 09:35 UTC · original

Thanks for catching the setup failure. The branch now creates FLAT only when requested, stores it as an optional pipeline, and logs/isolates its setup failure so the existing depth-based and reflection passes remain available. An unavailable FLAT pass returns before changing command roots.

A new setup regression test injects optional-shader rejection and checks that the existing passes survive; it also verifies that disabling the option makes zero FLAT compilation attempts. All 11 focused ambient tests and both workspace/all-targets Clippy configurations passed on this fix. The public Rust source was verified against that tested revision. Both ray-tracing documentation sections are retained.

The paired verification will follow your requested RT-off setup: same scene with the floor disabled versus 0.3, with the missing-depth fallback message confirmed in the enabled run and other lighting changes disabled. Keeping this draft until that isolated recording and full-video review are complete.

**@⁠t90** on GitHub · 2026-11-27 09:35 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7214855630) Thanks for catching the setup failure. The branch now creates FLAT only when requested, stores it as an optional pipeline, and logs/isolates its setup failure so the existing depth-based and reflection passes remain available. An unavailable FLAT pass returns before changing command roots. A new setup regression test injects optional-shader rejection and checks that the existing passes survive; it also verifies that disabling the option makes zero FLAT compilation attempts. All 11 focused ambient tests and both workspace/all-targets Clippy configurations passed on this fix. The public Rust source was verified against that tested revision. Both ray-tracing documentation sections are retained. The paired verification will follow your requested RT-off setup: same scene with the floor disabled versus 0.3, with the missing-depth fallback message confirmed in the enabled run and other lighting changes disabled. Keeping this draft until that isolated recording and full-video review are complete.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 09:44 UTC · original

@⁠t90 I queued the Windows CI for c9f82c4. The injected rejection and zero-attempt case cover the setup concern. One detail for the recording: missing depth SRV: using the depth-free ambient floor currently fires before the optional pipeline check. A one-time line after run(flat, ...) would confirm that the renderer actually recorded the dispatch.

Keep #206 out of the first floor A/B, since a matching depth view would select the depth-based path. The two patches apply together cleanly when it’s time to check that interaction.

**@⁠TaynanGT** on GitHub · 2026-11-27 09:44 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7215030227) @⁠t90 I queued the Windows CI for `c9f82c4`. The injected rejection and zero-attempt case cover the setup concern. One detail for the recording: `missing depth SRV: using the depth-free ambient floor` currently fires before the optional pipeline check. A one-time line after `run(flat, ...)` would confirm that the renderer actually recorded the dispatch. Keep #206 out of the first floor A/B, since a matching depth view would select the depth-based path. The two patches apply together cleanly when it’s time to check that interaction.
Author
Owner

@⁠t90 on GitHub · 2026-11-27 09:55 UTC · original

Added the one-time depth-free ambient floor dispatch recorded line immediately after run(flat, ...), with dispatch size and configured level. It confirms command recording rather than GPU completion. The same diagnostic is included in the dependent replacement branch; all 12 focused ambient tests passed on that stacked revision, and both public Rust files were verified against the tested local sources.

The first floor pair will exclude #206 as requested. Its recovered depth path will be checked separately afterward.

**@⁠t90** on GitHub · 2026-11-27 09:55 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7215252508) Added the one-time `depth-free ambient floor dispatch recorded` line immediately after `run(flat, ...)`, with dispatch size and configured level. It confirms command recording rather than GPU completion. The same diagnostic is included in the dependent replacement branch; all 12 focused ambient tests passed on that stacked revision, and both public Rust files were verified against the tested local sources. The first floor pair will exclude #206 as requested. Its recovered depth path will be checked separately afterward.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 10:08 UTC · original

@⁠t90 Windows CI passed on ce5a2ee. The new line records the dispatch size and level after the command is issued, so we can use it to identify the active path in the floor-only pair. I’ll use that revision for the comparison.

**@⁠TaynanGT** on GitHub · 2026-11-27 10:08 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7215531822) @⁠t90 Windows CI passed on `ce5a2ee`. The new line records the dispatch size and level after the command is issued, so we can use it to identify the active path in the floor-only pair. I’ll use that revision for the comparison.
Author
Owner

@⁠t90 on GitHub · 2026-11-27 11:06 UTC · original

Marking this ready for code review: all four Windows CI checks passed on ce5a2ee, and the conditional pipeline setup and post-dispatch diagnostic are in place. The floor-only RT-off comparison remains pending as discussed: off versus 0.3, gray lift and probe replacement disabled, excluding #206. The maintainer has offered to use this revision for that comparison. Existing combined-lighting and replacement-only clips do not establish the floor’s isolated effect.

**@⁠t90** on GitHub · 2026-11-27 11:06 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7216679739) Marking this ready for code review: all four Windows CI checks passed on `ce5a2ee`, and the conditional pipeline setup and post-dispatch diagnostic are in place. The floor-only RT-off comparison remains pending as discussed: off versus `0.3`, gray lift and probe replacement disabled, excluding #206. The maintainer has offered to use this revision for that comparison. Existing combined-lighting and replacement-only clips do not establish the floor’s isolated effect.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 11:16 UTC · original

@⁠t90 I’ll use ce5a2ee for the floor-only comparison: off and 0.3, with the same scene, executable and lighting settings. The recorded dispatch marker will confirm the active path in the enabled run. That is the remaining check for how the floor affects the image.

**@⁠TaynanGT** on GitHub · 2026-11-27 11:16 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/204#issuecomment-7216890373) @⁠t90 I’ll use `ce5a2ee` for the floor-only comparison: off and `0.3`, with the same scene, executable and lighting settings. The recorded dispatch marker will confirm the active path in the enabled run. That is the remaining check for how the floor affects the image.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/204/head:github-bot/gh-204'
git switch 'github-bot/gh-204'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-204'
git switch 'github-bot/gh-204'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-204'
git switch 'github-bot/gh-204'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-204'
git switch 'main'
git merge --squash 'github-bot/gh-204'
git switch 'main'
git merge --ff-only 'github-bot/gh-204'
git switch 'main'
git merge 'github-bot/gh-204'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.