Light stand-in holds the traced reflections to the light around (VICTORY_AMBIENT_REFLECT): eyes, glasses and panes no longer show the open sky indoors #314
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!314
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-314"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Serph91P on GitHub · 2026-11-26 15:49 UTC · original
Serph91P:ambient-reflect-hold→main· +410 −11 · 7 files · 1 commits · openWith the structure builder off, every reflection ray misses and the title takes its environment cube instead: the open sky, unoccluded, indoors too. A cornea showed a near-white patch about three times brighter than the face around it; glasses and window panes showed the outdoors through the walls. This holds the traced reflections to the light around, the way the stand-in already raises the diffuse light. One commit on
c9c932c.What it does
ambient.rs: a new role for the two programs that resolve the reflections (CS_TemporalResolve2_Opaque_*,CS_TemporalResolve1_Alpha_*). Right after each, one pass over its image (R9G9B9E5 as 32-bit integers): a texel brighter than a multiple of the stand-in's estimate around it (the mean at the four points about it, with a fifth of the room's slow mean, as the diffuse light has it; the constant inconstant:mode) is scaled down to that, hue kept.VICTORY_AMBIENT_REFLECT=<multiple>: unset 1,0oroffthe title's own reflections. Like the rest of the stand-in it acts only whileVICTORY_AMBIENTis set and the builder does not run.draw.rs: the stand-in's hook also runs after indirect dispatches, because both programs are dispatched so.victory replay --reflect <shader>:<table>+<descriptor>:<multiple>puts the same pass into a replayed frame, which is how it was checked before it ran in the title.That reflections can be held to the ambient light, and the switch's name, are beloooo's (VIctory-Belobug-AMD 44dcd437). There it is after
CS_UpdateHistoryand to a part of the constant; in the frame looked at here that program runs after the copy the transparent materials read, so the hold is before that copy, and to the frame's own estimate.Two things to decide
VICTORY_AMBIENTis in use (so withplay.ps1). If you would rather have it off until you have looked at it on your card, say so and I will make unset mean off.Tested (RX 7900 XTX, RADV Mesa 26.3.1, vkd3d-proton 71cae091, Proton Experimental, builder off)
reflections held to a multiple of the light aroundand the role's line; frame times as before (64-75 ms against 63-68 ms without it, single runs).x86_64-pc-windows-msvc;cargo xtask policyandcargo test -p xtaskpass; the added lines are rustfmt-clean (older differences in the touched files are unchanged).Not tested: Windows, NVIDIA, outdoor scenes,
constant:mode in the title. The victory-gpu unit tests were not run (they need Windows).What it does not do: it bounds the reflection, it does not stand in for one (no direction, no parallax). A glass globe with many small highlights still sparkles here, and the glass of a wire-mesh window is as before.
No game data in the commit.
🤖 Generated with Claude Code
@DTsordas on GitHub · 2026-11-26 18:31 UTC · original
Tested on an RX 9060 XT (RDNA 4, Navi 44): a visible improvement, and no frame-time cost.
Machine: Radeon RX 9060 XT 16 GB (
0x7590), driver 32.0.32015.7029 (26.10.1) · Ryzen 5 5600X · 64 GB · Windows 11 26300.Build:
c9c932c+ this PR (6c7e3a8) + #357 (the RDNA 4 compiler fix, so the title runs on this card),diag, all shaders translated ahead and pipelines warmed.scripts\play.ps1settings, Series X,VICTORY_PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1, builder off (no-RayTracing).How: so that both sides could be seen in the same spot, I wired the switch into the A/B phases. This was a local test hook only:
ambient.rsskips theRole::Reflectpass whilecrate::ab::pick("VICTORY_AMBIENT_REFLECT") == Some(false). The run usedVICTORY_AB=10,VICTORY_AMBIENT_REFLECT, so the hold turns on and off every 10 s while the player stands still. The log shows the pass running:reflections held to a multiple of the light around (VICTORY_AMBIENT_REFLECT) held=1.0,role=Reflect size=[2560, 1440].Picture: with the hold on, the picture is better. The player watched it switch back and forth at the same spot. The clearest case is the window in the prison corridor, with the camera standing still:
It came out the same at every switch the player watched there (several phases each way, from two camera angles): off, the sunset glow, and once with pieces of another view smeared through it; on, the door with its bars and its
A101sign, and the room behind it.Glossy floors went the same way: without the hold they look wet, over-bright and grainy (the diner counter and floor, the corridor floor). No screenshots, per the asset policy.
Frame time (A/B phases in the world, same spot, ~2,700-3,200 draws a frame):
Over the whole session, 20 phases in the world (10 each way, the player moving between spots): off 104.9 ms mean / 98.0 ms median, on 102.3 ms / 93.7 ms. No cost I can measure: the "on" phases are within the run's noise of the "off" ones, if anything slightly lower. No device removal and no compiler fault in the session.
AI-assisted (Claude Code).
@UwUCammie on GitHub · 2026-11-26 18:52 UTC · original
I ran this on the RX 7900 XT with RADV 26.3.1. In the same diner close-up, the blue-white patches over both eyes went away and the irises were visible. In another matched shot, the mean brightness of a floor patch dropped from 59 to 24 on a 0–255 scale. The ceiling lamp read 177 and 175 in those frames. Both starts used the same executable and warm caches at 720p, with ambient at 0.8 and the reflection limit at 0 or 1. The enabled run recorded the pass at 853×480. I put the AMD backport in jtrudeau1530#14.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.