Stand-in fix for too-bright reflections (missed reflection rays bounded by the light around; VICTORY_AMBIENT_REFLECT, off by default) #414

Open
Jrjy3 wants to merge 1 commit from upstream-pr/414 into main
Jrjy3 commented 2026-11-27 01:33:42 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by Jrjy3 on 2026-11-27T01:33:42Z.


Eyes, wet skin and glossy floors show reflections at open-sky strength indoors and in shade.

Cause: CS_RayMiss_de6b91a6 fills every reflection ray that hits nothing on screen with the sky probe's light. With the title's ray tracing and probes not running, nearly every ray misses, so all of them get the full sky. Eyes are small curved mirrors and almost always miss, so they glow the most.

Change: after CS_RayMiss runs, a small pass caps each pixel of its output image (UAV (1,104), R11G11B10, 853×480 at the 2/3 render) at the ambient stand-in's local light estimate × VICTORY_AMBIENT_REFLECT. NaN becomes 0. The program is only ever dispatched indirectly, so the stand-in hook now also runs on the indirect path, for this role only; the other ambient roles are unchanged.

  • Off by default. Needs VICTORY_AMBIENT on, because it reuses that pass's estimate.
  • Cost: one 8×8 compute pass over an 853×480 image.
  • Tested on a Radeon AI PRO R9700 (RDNA 4) at the indoor face scene. cargo test -p victory-gpu ambient passes 4/4.
  • It's a stand-in: it can dull reflections that really are bright (sun on chrome). The real fix is the rays hitting geometry (BVH and ray tracing) or the title's local probes.
Before After (VICTORY_AMBIENT_REFLECT=1)
before after

🤖 Generated with Claude Code

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:5519635641 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/414). Originally posted by [Jrjy3](https://github.com/Jrjy3) on 2026-11-27T01:33:42Z. --- Eyes, wet skin and glossy floors show reflections at open-sky strength indoors and in shade. **Cause:** `CS_RayMiss_de6b91a6` fills every reflection ray that hits nothing on screen with the sky probe's light. With the title's ray tracing and probes not running, nearly every ray misses, so all of them get the full sky. Eyes are small curved mirrors and almost always miss, so they glow the most. **Change:** after `CS_RayMiss` runs, a small pass caps each pixel of its output image (UAV (1,104), R11G11B10, 853×480 at the 2/3 render) at the ambient stand-in's local light estimate × `VICTORY_AMBIENT_REFLECT`. NaN becomes 0. The program is only ever dispatched indirectly, so the stand-in hook now also runs on the indirect path, for this role only; the other ambient roles are unchanged. - Off by default. Needs `VICTORY_AMBIENT` on, because it reuses that pass's estimate. - Cost: one 8×8 compute pass over an 853×480 image. - Tested on a Radeon AI PRO R9700 (RDNA 4) at the indoor face scene. `cargo test -p victory-gpu ambient` passes 4/4. - It's a stand-in: it can dull reflections that really are bright (sun on chrome). The real fix is the rays hitting geometry (BVH and ray tracing) or the title's local probes. | Before | After (`VICTORY_AMBIENT_REFLECT=1`) | |---|---| | ![before](https://raw.githubusercontent.com/Jrjy3/VIctory-7900XTX/b41b3d160417be391a465e46f5b5d4b104b0dd7f/reflection-cap-before.png) | ![after](https://raw.githubusercontent.com/Jrjy3/VIctory-7900XTX/b41b3d160417be391a465e46f5b5d4b104b0dd7f/reflection-cap-after.png) | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
UwUCammie commented 2026-11-27 01:39:12 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T01:39:12Z.


I tested the same reflection clamp idea on the Linux AMD branch with an RX 7900 XT and RADV 26.3.1. The pass recorded at 853×480 only with the switch enabled. It was easy to match the outdoor shot, but the two bedroom replays faced different surfaces, even after looking only at the indoor sections. I haven't verified the eye or floor fix on this setup yet. I'm trying the same copied save with short right-stick pulses and pauses to get matching views. Replay details

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7207467576 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7207467576). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T01:39:12Z. --- I tested the same reflection clamp idea on the Linux AMD branch with an RX 7900 XT and RADV 26.3.1. The pass recorded at 853×480 only with the switch enabled. It was easy to match the outdoor shot, but the two bedroom replays faced different surfaces, even after looking only at the indoor sections. I haven't verified the eye or floor fix on this setup yet. I'm trying the same copied save with short right-stick pulses and pauses to get matching views. [Replay details](https://github.com/UwUCammie/victory-amd/commit/d6e8031c)
jtrudeau1530 commented 2026-11-27 04:43:55 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by jtrudeau1530 on 2026-11-27T04:43:55Z.


This fixes the eyes on Linux/RADV too.

Setup: RX 7900 XT, Wine 11.18, vkd3d-proton 71cae091, Series X, VICTORY_AMBIENT=0.8. I compared the same cutscene shot (Lucia's close-up in the diner), matched across runs by thumbnail RMSE.

  • Without the cap, both eyes are flat bluish-white patches with no iris, as in #231.
  • With VICTORY_AMBIENT_REFLECT=1, the irises and pupils are back and the eyes look normal.
  • There's no measurable cost: 18.7 fps in that shot against 11.7–22.3 across the other runs.

I'm turning it on in our play settings.

One separate thing: the same close-up still shows the lips and mouth stretched and changing shape from frame to frame. That's unrelated to this PR. It's there with the ports off, with the relay at stage 1 and CARD_STEPS=0, and on older builds. I'm bisecting it and will open an issue with what I find.

AI-assisted (Claude Code).

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7210048323 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7210048323). Originally posted by [jtrudeau1530](https://github.com/jtrudeau1530) on 2026-11-27T04:43:55Z. --- This fixes the eyes on Linux/RADV too. Setup: RX 7900 XT, Wine 11.18, vkd3d-proton `71cae091`, Series X, `VICTORY_AMBIENT=0.8`. I compared the same cutscene shot (Lucia's close-up in the diner), matched across runs by thumbnail RMSE. - Without the cap, both eyes are flat bluish-white patches with no iris, as in #231. - With `VICTORY_AMBIENT_REFLECT=1`, the irises and pupils are back and the eyes look normal. - There's no measurable cost: 18.7 fps in that shot against 11.7–22.3 across the other runs. I'm turning it on in our play settings. One separate thing: the same close-up still shows the lips and mouth stretched and changing shape from frame to frame. That's unrelated to this PR. It's there with the ports off, with the relay at stage 1 and `CARD_STEPS=0`, and on older builds. I'm bisecting it and will open an issue with what I find. *AI-assisted (Claude Code).*
UwUCammie commented 2026-11-27 04:54:04 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by UwUCammie on 2026-11-27T04:54:04Z.


Thanks for matching the diner shot. My earlier bedroom clips faced different surfaces, so they couldn't answer the eye question. I've queued a cold diner comparison on the same RX 7900 XT with 71cae091, Series X and VICTORY_AMBIENT=0.8. The reflection switch will be the only setting that changes. I'll report the matched eye shot separately from launch-to-300-second timing and leave the mouth deformation out of the reflection result.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7210184950 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7210184950). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T04:54:04Z. --- Thanks for matching the diner shot. My earlier bedroom clips faced different surfaces, so they couldn't answer the eye question. I've queued a cold diner comparison on the same RX 7900 XT with `71cae091`, Series X and `VICTORY_AMBIENT=0.8`. The reflection switch will be the only setting that changes. I'll report the matched eye shot separately from launch-to-300-second timing and leave the mouth deformation out of the reflection result.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/414:upstream-pr/414'
git switch 'upstream-pr/414'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/414'
git switch 'upstream-pr/414'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/414'
git switch 'upstream-pr/414'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/414'
git switch 'main'
git merge --squash 'upstream-pr/414'
git switch 'main'
git merge --ff-only 'upstream-pr/414'
git switch 'main'
git merge 'upstream-pr/414'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
avatarmanz/VIctory-7900XTX!414
No description provided.