Use the matching depth plane for the diffuse ambient resolve #206

Manually merged
github merged 1 commit from github-bot/gh-206 into main 2026-11-27 13:47:45 +00:00 AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-27 09:30 UTC · original
TaynanGT:fix/ambient-depth-companion-197 → main · +80 −12 · 2 files · 1 commits · merged 2026-11-27 13:43 UTC

Garu667 reported that the RTX 3080 resolve stopped after fa8fc1d. The descriptor at the usual position was a 2D stencil SRV with DXGI format 22 and plane 1.

When that slot contains stencil, look for a bound depth SRV of the same texture and mip range among the resolve shader’s SRVs. Use the corresponding depth format and plane 0. The host still checks the resource shape before recording the ambient pass.

The regression test uses the reported descriptor and rejects a stencil view, a different resource and a different mip. Both source files passed the Rust parser and the diff check. Windows CI passed. In a matched RTX 4080 SUPER run with RT off, base 0982bde plus this change brought back the Resolve pass and restored green foliage. Dark rectangular water patches persisted in that run. Test report

Refs #197

**@⁠TaynanGT** on GitHub · 2026-11-27 09:30 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206) `TaynanGT:fix/ambient-depth-companion-197` → `main` · +80 −12 · 2 files · 1 commits · merged 2026-11-27 13:43 UTC Garu667 reported that the RTX 3080 resolve stopped after fa8fc1d. The descriptor at the usual position was a 2D stencil SRV with DXGI format 22 and plane 1. When that slot contains stencil, look for a bound depth SRV of the same texture and mip range among the resolve shader’s SRVs. Use the corresponding depth format and plane 0. The host still checks the resource shape before recording the ambient pass. The regression test uses the reported descriptor and rejects a stencil view, a different resource and a different mip. Both source files passed the Rust parser and the diff check. Windows CI passed. In a matched RTX 4080 SUPER run with RT off, base 0982bde plus this change brought back the Resolve pass and restored green foliage. Dark rectangular water patches persisted in that run. [Test report](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/206) Refs #197
Select a compatible depth SRV of the same texture when the resolve binds its stencil plane at the usual slot.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:39:59 +00:00
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-27 10:26 UTC · original · edited 2026-11-27 10:36 UTC

One run of this PR on an RTX 5070 Ti (not the 3080 from #197), ray tracing off (no -RayTracing). role=Resolve is logged at level=0.8 and there is no depth warning.

Setup: RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB, Windows. PR head 292adb5 (parent 0036c3a), cargo build --locked --profile diag -p victory --features diagnostics, exe md5 BBC7759AF3F0A22D0D9420E60CCA3348. Launch scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality (so VICTORY_AMBIENT=0.8 from the script defaults), plus the reflection hold VICTORY_AMBIENT_REFLECT=1, VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha, and VICTORY_KEYS_FILE set: in both runs a background job, started just before the launch script, wrote Enter presses (held 0.3 s) to it once its clock was past 35 s, beginning no new round after 62 s on its clock; each write first waited until the game had taken the previous file, and neither the write times nor when the game took each press are logged; a window capture after each 3 s wait while the game window was up (131 taken in this run, not posted). One 450 s run (n = 1).

Log, this run: no no stand-in for the indirect light line. The stand-in lines are all INFO:

INFO victory_gpu::ambient: a stand-in for the indirect light role=Radiance size=[640, 360] level=0.800000011920929 constant=0.0
INFO victory_gpu::ambient: a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0
INFO victory_gpu::ambient: a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0
INFO victory_gpu::ambient: a stand-in for the indirect light role=Resolve size=[1280, 720] level=0.800000011920929 constant=0.0

Earlier comparison run, without this PR: a different base, main 4ee1a47 plus the #143 commits (local tree 935eaca; #143 was rebased after this run) with VICTORY_RT_MISS unset, exe md5 B59ED46815DAAD639B969AB248C79ACE, same launch and reflection hold. It logs WARN victory_gpu::draw: no stand-in for the indirect light: missing depth SRV role=Resolve once, and Radiance/Reflect stand-in lines but no role=Resolve stand-in (INFO) line.

Picture, the same camera view in both runs at about 260 s and 440 s: in the comparison run the wall to the right of the window has a violet patch made of rectangular blocks and the area below it is near black; in this run that wall shows its surface and the papers on it, with no patch. Violet patches still show on that wall in some other shots of this run (clearly at about 284 s and 314 s, fainter at about 290, 327 and 351 s). The two runs differ by more than this PR (base commits and the #143 commits). I did not compare other scenes. No performance numbers here: one run, not interleaved with a baseline.

Refs #197

**@⁠CowboyBingus** on GitHub · 2026-11-27 10:26 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7215883753) · edited 2026-11-27 10:36 UTC One run of this PR on an RTX 5070 Ti (not the 3080 from #197), ray tracing off (no `-RayTracing`). `role=Resolve` is logged at `level=0.8` and there is no depth warning. **Setup:** RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB, Windows. PR head `292adb5` (parent `0036c3a`), `cargo build --locked --profile diag -p victory --features diagnostics`, exe md5 `BBC7759AF3F0A22D0D9420E60CCA3348`. Launch `scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality` (so `VICTORY_AMBIENT=0.8` from the script defaults), plus the reflection hold `VICTORY_AMBIENT_REFLECT=1`, `VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha`, and `VICTORY_KEYS_FILE` set: in both runs a background job, started just before the launch script, wrote Enter presses (held 0.3 s) to it once its clock was past 35 s, beginning no new round after 62 s on its clock; each write first waited until the game had taken the previous file, and neither the write times nor when the game took each press are logged; a window capture after each 3 s wait while the game window was up (131 taken in this run, not posted). One 450 s run (n = 1). **Log, this run:** no `no stand-in for the indirect light` line. The stand-in lines are all INFO: ``` INFO victory_gpu::ambient: a stand-in for the indirect light role=Radiance size=[640, 360] level=0.800000011920929 constant=0.0 INFO victory_gpu::ambient: a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0 INFO victory_gpu::ambient: a stand-in for the indirect light role=Reflect size=[1280, 720] level=0.800000011920929 constant=0.0 INFO victory_gpu::ambient: a stand-in for the indirect light role=Resolve size=[1280, 720] level=0.800000011920929 constant=0.0 ``` **Earlier comparison run, without this PR:** a different base, main `4ee1a47` plus the #143 commits (local tree `935eaca`; #143 was rebased after this run) with `VICTORY_RT_MISS` unset, exe md5 `B59ED46815DAAD639B969AB248C79ACE`, same launch and reflection hold. It logs `WARN victory_gpu::draw: no stand-in for the indirect light: missing depth SRV role=Resolve` once, and Radiance/Reflect stand-in lines but no `role=Resolve` stand-in (INFO) line. **Picture**, the same camera view in both runs at about 260 s and 440 s: in the comparison run the wall to the right of the window has a violet patch made of rectangular blocks and the area below it is near black; in this run that wall shows its surface and the papers on it, with no patch. Violet patches still show on that wall in some other shots of this run (clearly at about 284 s and 314 s, fainter at about 290, 327 and 351 s). The two runs differ by more than this PR (base commits and the #143 commits). I did not compare other scenes. No performance numbers here: one run, not interleaved with a baseline. Refs #197
Author
Owner

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

@⁠CowboyBingus role=Resolve confirms the diffuse pass recorded on the 5070 Ti. For the colour comparison, the direct pair is 292adb5 and its parent 0036c3a, with the reflection options fixed. The violet blocks you saw again around 284 and 314 seconds give us specific shots to line up in that pair.

**@⁠TaynanGT** on GitHub · 2026-11-27 10:37 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7216112234) @⁠CowboyBingus `role=Resolve` confirms the diffuse pass recorded on the 5070 Ti. For the colour comparison, the direct pair is `292adb5` and its parent `0036c3a`, with the reflection options fixed. The violet blocks you saw again around 284 and 314 seconds give us specific shots to line up in that pair.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-27 11:07 UTC · original

The direct pair you asked for in this comment: 0036c3a (parent) and 292adb5 (this PR), one 450 s run each, run back to back (parent first).

Setup: same as in my earlier comment, in both runs. RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB, Windows. Build: cargo build --locked --profile diag -p victory --features diagnostics -j 4. Exe md5: parent EC5A22383BB94A8381B73FC918593F85, this PR BBC7759AF3F0A22D0D9420E60CCA3348 (the same exe as in my earlier run). Launch: scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality. Reflection options fixed: VICTORY_AMBIENT_REFLECT=1, VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha. The same Enter-press job and window captures as before.

Shots at 283 s and 314 s (seconds from the start of each run's capture script, the same in both runs):

  • Parent: the wall to the right of the window has violet patches made of rectangular blocks, and the lower part of that wall around them is near black.
  • This PR: that wall shows its surface and the papers on it, with no block patch. A faint violet tint shows on parts of the papers.

Log:

  • Parent: WARN victory_gpu::draw: no stand-in for the indirect light: missing depth SRV role=Resolve once. Stand-in INFO lines for role=Radiance and role=Reflect, none for role=Resolve.
  • This PR: no missing-depth warning. Stand-in INFO lines for role=Radiance and role=Reflect, and none for role=Resolve in this run. My earlier run of the same exe logged role=Resolve once.
**@⁠CowboyBingus** on GitHub · 2026-11-27 11:07 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7216700002) The direct pair you asked for in [this comment](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/206): `0036c3a` (parent) and `292adb5` (this PR), one 450 s run each, run back to back (parent first). **Setup:** same as in [my earlier comment](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/206), in both runs. RTX 5070 Ti 16 GB, Ryzen 7 9800X3D, 64 GB, Windows. Build: `cargo build --locked --profile diag -p victory --features diagnostics -j 4`. Exe md5: parent `EC5A22383BB94A8381B73FC918593F85`, this PR `BBC7759AF3F0A22D0D9420E60CCA3348` (the same exe as in my earlier run). Launch: `scripts\play.ps1 -Console series-s -Machine 4070 -Windowed -Dlss quality`. Reflection options fixed: `VICTORY_AMBIENT_REFLECT=1`, `VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha`. The same Enter-press job and window captures as before. **Shots at 283 s and 314 s** (seconds from the start of each run's capture script, the same in both runs): - Parent: the wall to the right of the window has violet patches made of rectangular blocks, and the lower part of that wall around them is near black. - This PR: that wall shows its surface and the papers on it, with no block patch. A faint violet tint shows on parts of the papers. **Log:** - Parent: `WARN victory_gpu::draw: no stand-in for the indirect light: missing depth SRV role=Resolve` once. Stand-in INFO lines for `role=Radiance` and `role=Reflect`, none for `role=Resolve`. - This PR: no missing-depth warning. Stand-in INFO lines for `role=Radiance` and `role=Reflect`, and none for `role=Resolve` in this run. My earlier run of the same exe logged `role=Resolve` once.
Author
Owner

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

@⁠CowboyBingus The direct pair shows the rectangular patches clearing at the two sampled times, 283 and 314 seconds. The generic stand-in line has a shared four-message budget across roles, so Radiance and Reflect can use that budget before Resolve. A dedicated post-dispatch Resolve marker will let us tie the shot to the pass. The pale tint on the papers is still worth checking when we line up the same view again.

**@⁠TaynanGT** on GitHub · 2026-11-27 11:16 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7216888907) @⁠CowboyBingus The direct pair shows the rectangular patches clearing at the two sampled times, 283 and 314 seconds. The generic stand-in line has a shared four-message budget across roles, so Radiance and Reflect can use that budget before Resolve. A dedicated post-dispatch Resolve marker will let us tie the shot to the pass. The pale tint on the papers is still worth checking when we line up the same view again.
Author
Owner

@⁠Smoodie7 on GitHub · 2026-11-27 13:17 UTC · original

Positive result on an RTX 4070 Ti SUPER (driver 621.40, Ryzen 7 7700). Series S, 1080p output, -Dlss quality -FrameGen, no ray tracing, -Machine 4070, warmed caches. Build: 231b6a96 with this PR merged.

  • The purple/pink foliage I reported in #223 / #212 (it faded and came back with camera movement) looks gone in this session. It was very playable: about 17 rendered FPS and 30 to 34 presented in the world.
  • no stand-in for the indirect light: missing depth SRV role=Resolve, which every run without this PR logged once at the first world frames, is no longer logged.

One caveat: #208 was merged in the same build, so this isn't yet the "#206 alone" pass you asked for. #208's paired programs are mostly the shadow mask, water and sky diffusion, not foliage, and without RT its two wave64 water programs (a10179ab7eda0dc3, 6871d6e4b3ac9a10) still failed to translate in this run. I can do the strict #206-only run on the same route next.

**@⁠Smoodie7** on GitHub · 2026-11-27 13:17 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7219295919) Positive result on an RTX 4070 Ti SUPER (driver 621.40, Ryzen 7 7700). Series S, 1080p output, `-Dlss quality -FrameGen`, **no ray tracing**, `-Machine 4070`, warmed caches. Build: `231b6a96` with this PR merged. - The purple/pink foliage I reported in #223 / #212 (it faded and came back with camera movement) **looks gone** in this session. It was very playable: about 17 rendered FPS and 30 to 34 presented in the world. - `no stand-in for the indirect light: missing depth SRV role=Resolve`, which every run without this PR logged once at the first world frames, is no longer logged. One caveat: #208 was merged in the same build, so this isn't yet the "#206 alone" pass you asked for. #208's paired programs are mostly the shadow mask, water and sky diffusion, not foliage, and without RT its two wave64 water programs (`a10179ab7eda0dc3`, `6871d6e4b3ac9a10`) still failed to translate in this run. I can do the strict #206-only run on the same route next.
Author
Owner

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

@⁠Smoodie7 That combined build gives us a positive result on the 4070 Ti SUPER: the resolve warning is gone and the foliage looks stable. The #206-only pass with RT off is still the comparison that isolates the depth-plane fix. Keep the same camera and warmed cache for it.

**@⁠TaynanGT** on GitHub · 2026-11-27 13:23 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7219413131) @⁠Smoodie7 That combined build gives us a positive result on the 4070 Ti SUPER: the resolve warning is gone and the foliage looks stable. The #206-only pass with RT off is still the comparison that isolates the depth-plane fix. Keep the same camera and warmed cache for it.
github manually merged commit 25324741b1 into main 2026-11-27 13:47:45 +00:00
Author
Owner

@⁠efsebayern on GitHub · 2026-11-27 13:39 UTC · original

I tested this with ray tracing off on an RTX 4080 SUPER 16 GB, i7-13700K, 32 GB, Windows 11.

  • Build: diag with --features diagnostics, this PR (292adb5) merged locally onto main 0982bde.
  • Settings: -Console series-s -Machine 4070, launcher defaults (VICTORY_AMBIENT=0.8), no -RayTracing. I played by hand, out on the water and on land.
main 0982bde main + this PR
Log WARN ... no stand-in for the indirect light: missing depth SRV role=Resolve a stand-in for the indirect light role=Resolve size=[1280, 720] level=0.8
Foliage in the sun purple / pink green
Water reflections wrong in places correct overall
Dark rectangular patches on the water yes, flickering still there, flickering
Device loss / crash none none

So the depth plane fix restores the Resolve role here too and clears the purple foliage reported in #197. On this card the darker flickering rectangles on the water stay with this PR alone. With #208 added on top they get fewer, but they don't go away; details are in #208.

AI-assisted (Claude Code).

**@⁠efsebayern** on GitHub · 2026-11-27 13:39 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7219762826) I tested this with ray tracing off on an **RTX 4080 SUPER 16 GB, i7-13700K, 32 GB, Windows 11**. - **Build:** `diag` with `--features diagnostics`, this PR (`292adb5`) merged locally onto `main` `0982bde`. - **Settings:** `-Console series-s -Machine 4070`, launcher defaults (`VICTORY_AMBIENT=0.8`), no `-RayTracing`. I played by hand, out on the water and on land. | | `main` 0982bde | `main` + this PR | |---|---|---| | Log | `WARN ... no stand-in for the indirect light: missing depth SRV role=Resolve` | `a stand-in for the indirect light role=Resolve size=[1280, 720] level=0.8` | | Foliage in the sun | purple / pink | **green** | | Water reflections | wrong in places | correct overall | | Dark rectangular patches on the water | yes, flickering | **still there**, flickering | | Device loss / crash | none | none | So the depth plane fix restores the Resolve role here too and clears the purple foliage reported in #197. On this card the darker flickering rectangles on the water stay with this PR alone. With #208 added on top they get fewer, but they don't go away; details are in #208. *AI-assisted (Claude Code).*
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-27 13:43 UTC · original · edited 2026-11-27 13:45 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T13:44:37.534137Z 292adb5 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-27T13:45:12.178407Z 292adb5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-27 13:43 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7219869947) · edited 2026-11-27 13:45 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"292adb5a807dd62e6f938fd47716e1f82bdb393e","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"292adb5a807dd62e6f938fd47716e1f82bdb393e","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"292adb5a807dd62e6f938fd47716e1f82bdb393e","mergeGateEnabled":false,"pullRequestNumber":206,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-27T13:44:37.534137Z">2026-11-27T13:44:37.534137Z</relative-time> | `292adb5` | Draft marked ready | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T13:45:12.178407Z">2026-11-27T13:45:12.178407Z</relative-time> | `292adb5` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

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

@⁠efsebayern The isolated run ties the foliage change to the depth-plane fix: the Resolve pass starts, the foliage is green, and the dark water rectangles persist. Windows CI passed and this is now in main at 2532474. The remaining water case can stay in #208 and #270 with its own camera comparison.

**@⁠TaynanGT** on GitHub · 2026-11-27 13:44 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/206#issuecomment-7219881578) @⁠efsebayern The isolated run ties the foliage change to the depth-plane fix: the Resolve pass starts, the foliage is green, and the dark water rectangles persist. Windows CI passed and this is now in main at `2532474`. The remaining water case can stay in #208 and #270 with its own camera comparison.
This discussion has been locked. Commenting is limited to contributors.
No description provided.