Ambient: hold the resolved reflections to the light around (glowing eyes and floors indoors) #818
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!818
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-818"
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?
@Ahyildiz on GitHub · 2026-11-28 06:56 UTC · original
Ahyildiz:fix/indoor-reflection-hold→main· +154 −6 · 2 files · 1 commits · closed without mergingFixes the indoor glow from #163: eyes, glossy floors and glass lit by the sky's light inside buildings.
Cause
Indoors,
CS_TemporalResolve2_OpaqueandCS_TemporalResolve1_Alphawrite traced reflections that are much brighter than the room. Bounding the miss rays (CS_RayMiss) does not help, because the extra light enters after them. I tested that on an RTX 5080: even with all of the miss output zeroed, the glow stayed.Change
A small
holdcompute pass runs after each of those resolves on their R9G9B9E5 image (R32_UINT, at table places (1,128) and (1,136)). It limits each texel ton ×the light around it and keeps the hue. The light around is the ambient estimate at the four points about the texel, mixed with a fifth of the room's slow mean.VICTORY_AMBIENT_REFLECT=<n>(1 works well) plusVICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha. With either unset nothing changes, and the pipeline is not even built.VICTORY_AMBIENT. Skipped while the BVH builder runs.Testing
reflections held after their resolve … n=1, and the frame rate is unchanged (~27 fps base).Credits
Ported from TaynanGT/Vice-Tay#99 (fc9ef8a, fa90adf), which comes from Serph91P's avatarmanz/VIctory-7900XTX#314 (6c7e3a87). The idea and the switch name are beloooo's (VIctory-Belobug-AMD 44dcd437).
🤖 Generated with Claude Code
@Ahyildiz on GitHub · 2026-11-28 07:01 UTC · original
The failing check is clippy on two lines that are already in
main, outside this PR's files:crates/victory-gpu/src/shadow.rs:1708:turns % 16 == 0should use.is_multiple_of(16)(clippy::manual_is_multiple_of).crates/victory-shader/src/emit/mod.rs:2768: let-and-return (clippy::let_and_return).ambient.rsanddraw.rs, the only files changed here, have no clippy findings.mainitself should fail the same job until those two lines are fixed; I left them out to keep this PR to the one change.@nick0451 on GitHub · 2026-11-28 10:01 UTC · original
Tested in the game: RTX 3090 24 GB (driver 610.88), i9-14900K, Windows 11. A release build of this PR merged onto main at
63b902f. Series S, DLSS Performance, frame generation off.Each build was started once as a warm-up, then main, this PR with the switches unset and this PR with
VICTORY_AMBIENT_REFLECT=1andVICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alphawere run in turn, three rounds each. Every run used the same frozen save, outdoors on a balcony by the water, about 6,000 draws a frame. Each run was 40 s to settle, 60 s measured, then a screenshot.reflections held to a multiple of the light around ... held=1.0andreflections held after their resolve ... n=1. With them unset there is no such line.No crashes or
ERRORlines in any run.Tested with an AI assistant (Claude Code); results are from this PC.
@Yoshi-233 on GitHub · 2026-11-28 13:14 UTC · original
Tested the post-resolve hold on an RTX 4070 Ti SUPER in the safehouse living room. Both miss-stage bounds from #393 stayed enabled. I alternated only the hold after CS_TemporalResolve2_Opaque and CS_TemporalResolve1_Alpha, at 1×, every 12 seconds within a single process. Series X, BVH builder off, DLSS Quality M (2560×1440 to 3840×2160), 2× frame generation.
Across 8 off and 11 on pictures matched on the doorway, the median 8-bit luma of the same front floor patch fell from 212 to 96. The share above 210/255 fell from 52.6% to 0%, and wood grain became visible again. The same patch in one pair of native RGBA16F inputs to DLSS went from 0.50 to 0.04 median linear luma. The wall and the back of the shirt darkened to a lesser extent. Some small block-shaped differences remain at the carpet edge.
In four consecutive intervals without a capture readback, native median frame times were 68.0 ms on, 68.5 off, 67.6 on, and 67.9 off (about 8,200 draws/frame). Both settings showed the foreground character, bridge and water ripples in a second view outside. That exterior comparison covers one sky and camera angle. The visual improvement on the indoor floor was repeatable on this 40-series card.
@KyleS98 on GitHub · 2026-11-28 16:04 UTC · original
Tested indoors on a 30-series card, in the house the description names. RTX 3090 Ti 24 GB (driver 616.92), Ryzen 9 9950X3D, Windows 11, Series S profile, DLSS off. This commit (
8db298b) cherry-picked onto my fork's tree, which has yourmainat63b902fmerged in; the only conflicts were with stand-in changes of my own inambient.rsanddraw.rs.Picture, the hold flipped on and off inside one run. The shared save in Jason's house starts in a room of its own choosing each time, so two runs do not show the same view. I gave the role a switch that a diagnostics build flips every 8 s (
VICTORY_AB) and took a screenshot every 4 s. Kitchen side, about 7,400 draws a frame:VICTORY_AMBIENT_REFLECT=1, both resolves named)Every off/on pair of the run shows the same. The log has
reflections held to a multiple of the light around ... held=1.0and the count of held resolves rising (5,000 in a five-minute run).Outdoors (the deck of that house, the same way): the same picture, but for the glass door, which is darker with the hold.
Cost. In the same view the phases' mean frame is 37.5 ms with the hold and 37.2 without. In the prologue's cell, where this PC is limited by the CPU side, a release build with the hold on by default ran 39.3, 39.0 and 38.8 fps in three runs against 39.5 and 39.3 without it: nothing I can measure.
Not covered: night, other interiors, the BVH builder on.
AI-assisted (Claude Code, Claude Fable 5.2). Numbers are from this PC; no game files or screenshots attached.
@cxy0072019-sketch on GitHub · 2026-11-28 16:47 UTC · original
RTX 5070 Ti follow-up in the Gone Fishing house on Windows, with an i5-14600KF. I cherry-picked
8db298bonto a local#1069-based integration and added a diagnostics-only A/B guard that bypasses only the post-resolve reflection pass. The process stayed on the same camera inside the living room. Series S, 1920×1080 output, internal 720p, DLSS and frame generation off, ambient estimate on and BVH builder off.Five 12-second phases per setting, alternated in one process. The brightness samples are 8-bit Rec.709 luma from two fixed regions in the composed captures.
The white-blue wash left the floor in all five enabled captures. The planks and tabletop contents became visible, and the light around the window and the illuminated wall remained visible. Both sides had 959 timed frames. This test covered the living-room camera while the in-game sunlight was changing. The timing difference was within phase-to-phase variation. Ambient unit tests passed locally (5/5). Test automation and analysis were AI-assisted.
@trustno1-coder on GitHub · 2026-11-28 19:22 UTC · original
Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.
@remie1529 on GitHub · 2026-11-29 14:56 UTC · original
Confirmed working when rebased onto \
829188e\ on RTX 4070 (driver 616.92, Windows 11, Series X 2560x1440, DLSS Performance, DLSS FG 2x, RT off). With \VICTORY_AMBIENT_REFLECT=1\ and \VICTORY_AMBIENT_REFLECT_IN=CS_TemporalResolve2_Opaque,CS_TemporalResolve1_Alpha, the log confirmseflections held after their resolve\ and the solid-white indoor terrarium, glass table, and vase render cleanly again. Would be great to see a rebased PR for current \main!
Pull request closed