Reflections and stand-in light: fill the tiles the miss program leaves, hold them to the light around (#818 rebased), sky level and night floor #4348
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!4348
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4347"
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?
@advxrsary on GitHub · 2026-11-30 19:10 UTC · original
advxrsary:ambient-fill-hold-sky→main· +661 −13 · 3 files · 7 commits · openRelated: #2440, #818
What it changes
Seven commits on main
84bd61e2. All of them act only whileVICTORY_AMBIENTis set. The launcher sets it.1. Fill after the miss program (
dd897958,ae61d109)The rays' reflection image is written in tiles, and only the miss program writes some of them. When the miss
program is left out, those tiles keep bytes from earlier frames. In play this shows as white or coloured blocks on
floors and glass. After each dispatch of the miss program, a small pass fills these tiles with the light around.
VICTORY_AMBIENT.VICTORY_AMBIENT_SPECULAR_FILL=0turns it off.dark rooms, glare and blue grain.
2. Hold the resolved reflections (
52852f7d)This is #818 by @Ahyildiz, rebased on main. The author is kept, and the logic is not changed. #818 was closed
with a request for a rebase.
VICTORY_AMBIENT_REFLECT=<multiple>andVICTORY_AMBIENT_REFLECT_IN=<program names>. Off unless set.MOSTword (words[9]) forRole::Reflect.3. Sky level for the stand-in light (
8c48fb01)VICTORY_AMBIENT=sky:<share>. The stand-in light takes its level from the title's own sky map, which the missprogram reads (32x32 RGBA16F, absolute units), multiplied by the title's exposure factor. The constant level lit a
night like a day. A share of 0.07 gives about what the constant 1.2 gives at noon.
4. Night floor, keys and sliders (
3bb4d1b5,55ee20fe)VICTORY_AMBIENT_FLOOR=<level>: withsky:, the lowest level of the stand-in light, in the title's units.Without it, everything that no lamp reaches is black at night.
sky:: F5 and F6 change the sky share, Shift with them changes the floor, Ctrl with themchanges the reflection multiple. F2, F7 and F8 belong to the layer, so I use F5 and F6 only.
VICTORY_MENU_FILEnames, so the next start uses it.5. Mirror (
1d4a1aa4): withsky:, the mirror keeps the title's own light.6. Test helper (
e5571b22):blank_menuin the menu tests indexedvalues[0]. The sliders have no listedvalues, so it now takes an empty value for them.
How it was tested
DLSS performance, frame generation x3, ray tracing off.
63b902fwith #428, the same key script in my capture harness. Blocky white tiles stay in the lowerhalf of the picture in 3 of 4 frames.
84bd61e2, about three minutes each: this branch 19.6 fps median at 8,090 draws a frame, main 21.9 fpsat 8,581 draws. The places were not the same, so I do not read a cost or a gain from these numbers. The fill
adds one compute pass for each dispatch of the miss program.
on main.
cargo testpassed for the crates it touches: no, but not because of this branch.cargo test -p victory-gpu --lib: 1131 passed, 2 failed. The same 2 also fail on main84bd61e2:list::thin::tests::bindings_record_no_workandshader_cache::tests::every_switch_of_the_translator_is_in_the_key.cargo clippy -p victory-gpu --all-targets -- -D warningsandcargo xtask policyalso fail on main itself(
shadow.rs:7197,host.rs:5092,victory-shader/src/native.rs). This branch adds no finding.Not fixed here: object flicker. I still see it with and without this branch.
Checked for overlap
#3580, #818, #428
the light around instead. They change the same dispatch, so only one way should go in, or the clear first and
the fill after it.
@advxrsary on GitHub · 2026-11-30 19:28 UTC · original
A correction to the description, about commit 1 (the fill).
On main with ray tracing off (
VICTORY_BVH_BUILDERunset), the miss program does not run at all. In my session on this branch today, the ambient line says0 dispatches of CS_RayMiss followedin every 10 s window. The layer leaves out about 815 dispatches a frame asshades ray-tracing hits without BVH, and the miss program is one of them.The fill runs after each dispatch of the miss program. So in this mode it does nothing. It acts only when the miss program runs, for example with the structure builder on.
The Before and After in the description come from main
63b902f. There the miss program still ran. I did not check if the tiles still show on84bd61e2with ray tracing off.What acts in the default mode is the hold (commit 2, when
VICTORY_AMBIENT_REFLECTis set) and the sky level with the night floor (commits 3 and 4, withVICTORY_AMBIENT=sky:<share>).@Jesper-Andersson on GitHub · 2026-11-30 21:47 UTC · original
Tested a port of this PR on an 8 GB card with ray tracing off. In one session, glass and car reflections looked good to the player. Earlier sessions today, on builds without this PR and #3580, had shown shadowy squares on glass and reflective surfaces. The log shows
without_depthnow active in that mode, which may be why. Not isolated.Setup: RTX 2070 SUPER 8 GB (Turing), driver 621.40, Windows 11, Ryzen 7 5800X, 32 GB RAM, ReBAR off. Release build of our fork: upstream v2026.11.30.02 plus opt-in ports, plus a port of this PR (head
e5571b22, our commit e12d12e46) and #3580 (our commit fbc30ad22), merged by hand where both changesky_miss_left_out. Series S profile, DLSS Performance (preset L), FSR 3 frame generation x2.VICTORY_AMBIENT=1,VICTORY_AMBIENT_SPECULAR=1,VICTORY_AMBIENT_SPECULAR_BOUNDunset,VICTORY_AMBIENT_SPECULAR_FILLunset (so on).VICTORY_BVH_BUILDERunset;VICTORY_BVH_MISS=1set (a different switch).What the log shows, from the
a stand-in for reflectionsline (mostly 10 s windows; counts are per window as logged). Before and after are two different launches, not an A/B:without_depthruns whenfill_asked()is true; before, it neededVICTORY_AMBIENT_SPECULAR_BOUND=1. That is where the counts in the last column come from. So in this mode the fill switch may still change the picture, through that path. That is our reading of the diff and the log; we haven't checked it withVICTORY_AMBIENT_SPECULAR_FILL=0.Other differences between the two launches: the later one also had
VICTORY_STORE_BESIDE=1,VICTORY_TEXTURE_HASH_EVERY=64(a local switch for #4494),VICTORY_SHARPEN=0.5(0 before) and a port of #4298. None of these touch reflections as far as we know, but the comparison isn't controlled.Not tested:
VICTORY_AMBIENT_SPECULAR_FILL=0as an A/B at the same spot,VICTORY_AMBIENT_REFLECT, thesky:mode, ray tracing on. No timing for this PR alone.Drafted with AI assistance (Claude Code).
@IRennie74 on GitHub · 2026-11-30 22:38 UTC · original
A note on what changes by default, since the launcher sets
VICTORY_AMBIENT:fill_asked()is on unlessVICTORY_AMBIENT_SPECULAR_FILL=0, andwithout_depthnow runs whenbound_asked() || fill_asked()(ambient.rs, thewithout_depthhunk). As the RTX 2070 SUPER report above shows, that path now runs a few hundred times per 10 s window with ray tracing off, where before it neededVICTORY_AMBIENT_SPECULAR_BOUND=1. So with ray tracing off the fill switch still changes what runs, through that path, not only after the miss program.sky_miss_left_out(draw.rs) now returns false whenever the fill andambient::on(Role::Miss)are on. Where the miss program reaches that check, it is therefore no longer left out by default, and it runs plus one fill pass per dispatch.Neither has a card-time figure yet (the 19.6 vs 21.9 fps runs were in different places). On cards where the card is already the wall in busy frames (our RTX 3060 spends 57-62 ms on the card in 5,000-draw frames), an A/B with
VICTORY_AMBIENT_SPECULAR_FILL=0at the same spot would settle whether the fill should stay on by default. The card meter line is enough for that.If stale tiles are what the fill removes, it may also bear on flicker. "Bytes of earlier frames ... a shimmer that moves with the camera" is the kind of event the A-B-A detector from #4377 (
VICTORY_FLICKER_DETECT=1, not merged yet) counts. A before/after count would show whether it helps there too.This conflicts with #4536 in
after()(gather()replacingrun(&pass.gather, 20, 45, 1)next to yourconstant <= 0.0change). It also makes the air pass wait forKEPTin every mode, and #4536 changes what that pass computes (its cap now readspointsnear the eye), so the two together are worth one look.e5571b2292to5daf9e1661@advxrsary on GitHub · 2026-12-01 11:10 UTC · original
I rebased the branch on main
5fabb46eand measuredVICTORY_AMBIENT_SPECULAR_FILL=0against the default, as asked above.Setup: RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D, Windows 11. Diagnostics build of this branch (
5daf9e16). The switches ofplay-nvidia.ps1at5fabb46e(VICTORY_AMBIENT=0.8,VICTORY_AMBIENT_SPECULAR=1,VICTORY_BVH_BUILDERunset), Series X, native 1440p, no DLSS, no frame generation. The same save in the first house and the same key script: the camera turns from 95 s to 170 s. Four runs in the order on, off, on, off.Card time. I paired each world frame line after 90 s with the card meter line of the same second, and fitted the card time in the title's lists against the draw count (35 points for each mode):
FILL=0The difference is 0.34 ms. That is inside the noise, so on this card the fill path costs less than about 1 ms a frame. The card is the limit here: it is 91 to 98 % busy, and the title's lists take about 30 ms a frame.
What runs. With the fill on, the
without a depth ... given the light aroundcount is 500 to 556 per 10 s window. WithFILL=0it is 0.dispatches of CS_RayMiss followedis 0 in every window of all four runs. This agrees with the RTX 2070 SUPER report: in this mode the switch acts only throughwithout_depth.Picture. I compared frames with the same number from runs at the same view (frames 1500 to 2100, the hero stands still). The difference is on the floor and the glass:
FILL=0, run 1Two runs with the fill on differ by 5 levels in that box. A run with the fill on and a run with
FILL=0differ by 19. With the fill on, the floor reflection is brighter and more even. WithFILL=0it is darker and shows glossy streaks from the window. I did not check which of the two is closer to the title with ray tracing on.Not tested: the second off run walked to the yard after 100 s, so only the first pair has the same view for frames. Other cards, DLSS and frame generation, ray tracing on.
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.