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

Open
github-bot wants to merge 1 commit from github-bot/gh-414 into main AGit
Owner

@⁠Jrjy3 on GitHub · 2026-11-27 01:33 UTC · original
Jrjy3:reflection-cap → main · +85 −3 · 2 files · 1 commits · open

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

**@⁠Jrjy3** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/414) `Jrjy3:reflection-cap` → `main` · +85 −3 · 2 files · 1 commits · open 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)
CS_RayMiss_de6b91a6 fills the reflection rays that hit nothing on screen with
the sky probe's light, which without the title's probes and ray tracing comes
out as open sky at full strength: eyes, wet skin and glossy floors glow indoors
and in shade. After it runs, its image (UAV (1,104), R11G11B10 853x480 at the
title's 2/3 render) is bounded per pixel by the stand-in's light around, times
the setting. It is dispatched only indirectly, so the indirect path runs the
stand-in for it too (the other roles keep to direct dispatches).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:15:34 +00:00
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 01:39 UTC · original

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

**@⁠UwUCammie** on GitHub · 2026-11-27 01:39 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7207467576) 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)
Author
Owner

@⁠jtrudeau1530 on GitHub · 2026-11-27 04:43 UTC · original

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).

**@⁠jtrudeau1530** on GitHub · 2026-11-27 04:43 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7210048323) 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).*
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 04:54 UTC · original

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.

**@⁠UwUCammie** on GitHub · 2026-11-27 04:54 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/414#issuecomment-7210184950) 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 can be merged automatically.
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/414/head:github-bot/gh-414'
git switch 'github-bot/gh-414'

Merge

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