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!4536
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4535"
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?
@Lyrnc on GitHub · 2026-11-30 22:04 UTC · original
Lyrnc:fix/interior-fog→main· +913 −27 · 1 files · 5 commits · openWhat this does
v2026.11.30.01 merged four ambient-light PRs and then reverted them while the black indirect light was being chased: #1930 (
42c9d828), #1995 (35c0730e), #2336 (311884d0) and #1736 (09a0a14d). That bug turned out to be #2580. The release notes say the four were never retested.This PR puts them back unchanged on current main (
git revertof each revert) and adds one test. They were retested on main (84bd61e2, v2026.11.30.02), in an interior and outdoors, with a warm and a cold shader cache.What changes by default:
VICTORY_AMBIENT_AIRis set;victory playsets 1): near the eye, the air's bound is now the darker of the room's slow mean and the light of the surface seen through that air. Before, it was the room's mean alone.VICTORY_AMBIENT_PROBE_OUTLIERS=1) and #1736 (VICTORY_AMBIENT_TILED=1) are opt-in. Nothing changes unless they are set.New test:
ambient::tests::the_air_is_bound_by_the_darker_of_the_room_and_the_surface_seenruns the realclear_airshader on WARP over a 4x1x4 volume. Cases: a dark wall in a room whose mean is bright, a bright window seen from a dark room, sky-blue air (the tint is kept), and air already under the bound. With main's formula it fails: at the nearest slice in front of the dark wall, 0.5 gets through where the bound is 0.02. #1930's own test only redoes the arithmetic on the CPU.Measured
RTX 5080 16 GB, 9800X3D, 32 GB, Windows 11. Series X profile, native 2560x1440, DLSS off, frame generation off, ray tracing off. The save attached to #3972, which starts at a house; we measured standing and doing a slow look-around in its living room and kitchen.
84bd61e2To compare #1930's formula with main's on the same frames, we used a local diagnostics build that switches the formula while the game runs, a few hundred ms apart. The figures are the mean linear luminance of the frame (x1000):
In this interior the bound never takes hold (even at 0.25x the change stays under 1 %), so #1930 does no harm here. It matters where the room's mean is far above the wall in view: the restaurant and barbershop reported on #1930 itself, and the dark rooms and menus of #1395. The whole stand-in (keep, place, gather, raise, air) costs about 1 ms of card time a frame (meter 27.9-28.1 ms with it, 26.7-27.1 without).
About the interior fog and the 1-7 fps reports (#3972, #3865, #3685, #3835)
These reports are all on v2026.11.29.05. On .30.02 the same interior is not slower than outdoors: it is GPU-bound at the same 33-36 ms. No list in the card meter is over 3.2 ms; the volumetric lists add up to about 4 ms. The 3-9 fps dips on entering are pipelines being made for new views, and they go away on a warm cache. The look indoors is a mild veil plus the glow around windows. The air bound does not change it, and neither does leaving out the volumetric passes. v2026.11.30.01 changed exactly the programs that the .29.05 reports point at: #3871 fixed the lane-mask joins of 18 folded wave64 programs (particle light atlas, scattering gather, particle updates, shadow masks, water volume light), which had loops running to the 4096-iteration guard. #3896 unfolded the light atlas (indoor 4-8 fps -> 26-31 fps).
What is not confirmed here:
So whether the bar is clean on .30.x still needs a reporter with a save there.
Tests
cargo test -p victory-gpu --lib --locked ambient: 21 passed (the four PRs' tests and the new one).cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, with and without--all-features: the only errors are ones already on main, none inambient.rs. They areshadow.rsrangedunused,host.rs:5092manual_is_multiple_of, and with all featurescopystat.rsmbunused.cargo test -p xtask: only the failure already on main (repository_passes_policy: a 560-character hex run incrates/victory-shader/src/native.rs).Credit: the four changes are dheerajc8073's (#1930), Yoshi-233's (#1995), yumaste's (#2336) and Gauss999's (#1736).
AI use: this was investigated, measured, and written with Claude Code (Claude Opus 5.5). The runs and numbers above are from our own PC.
🤖 Generated with Claude Code
@IRennie74 on GitHub · 2026-11-30 22:39 UTC · original
One thing to check about #1930's bound, since it is on by default under
victory play. Near the eye, the cap was the room's slowly followed mean. Now it ismin(room, seen_luma), andseen_lumacomes from this frame's (or the last gather's)points, which follow the depth under the camera. While turning, the cap near the eye can therefore change from frame to frame wherever the surface in view switches between dark and bright (a dark wall edge against a window). If the air's own value sits between the two, that could show as the veil pulsing.Your look-around numbers are frame means, which would not show a local pulse. On a 6-core PC (Ryzen 5 5600X, RTX 3060, Series S) we already count about 59 A-B-A flicker events a minute while walking, with the detector from #4377 (
VICTORY_FLICKER_DETECT=1, not merged yet). We can run this branch against main on that route and report whether the count moves, if that is useful.Also,
after()inambient.rsconflicts with #4348: this PR replacesrun(&pass.gather, 20, 45, 1)withgather(), and #4348 changes theconstant == 0.0test around the same call and adds aRole::Reflectarm. The merge should be simple, but whichever lands second needs it.eef4b7c51etoe693838349@Lyrnc on GitHub · 2026-12-01 04:09 UTC · original
Thanks @IRennie74. You're right about the mechanism, and the frame means in the description couldn't show it.
Where
seen_lumacomes from.clear_airmaps each air column to one of the 160x90 points (q) and readspoints[q].w, the light the last gather left there.seen()in the gather).c.w / (dd + r2), withr2 = 0.25 + 0.0025 z².pointshas no history. It is whatever the last gather wrote: this frame's, if a gather ran before the air's step, otherwise the frame before's.What that means for the bound. Where a point's texel sits on a silhouette with a large depth step (a wall edge at 3 m against outside at 40 m), a sub-pixel turn can move it across, and its light jumps between the light at the two places. Before #1930 that already moved the cap of the far slices (
lerp(room, seen, far)). With #1930 it moves the near slices' cap too, but only on the dark side. Near the eye the cap isair * min(room, seen), so it changes only whileseenis below the room's mean, and it only clamps air brighter thanair * seen. If it shows, it would be at silhouettes while turning, one point (16x16 px) at a time, not as the whole veil pulsing. I can't tell from the code whether the air's own value sits in that band in practice.Measuring it: yes please. On your route, this branch against main with
VICTORY_FLICKER_DETECT=1is close to #1930 alone. Of the other three, #1995 and #1736 are opt-in, and #2336 only reuses terms in the gather's sums. If the count moves, the change I'd make: bound the near slices by the mean ofseenover the 3x3 points aroundq, while the far slices keep the single point. A dark interior is dark at all nine points, so #1395's case stays the same. A silhouette flipping one point would then move the near cap by a ninth of the step instead of all of it. If the count doesn't move, I'd leave the bound as #1930 had it.#4347: agreed. Whichever lands second takes the merge in
after(). If #4348 goes first, I'll rebase this onto it.I've also rebased this onto current main (now
e6938383). Main's history was rewritten after0c8c2092, which made this PR show as conflicting. The five commits are the same patches. One6938383(RTX 5080, Windows 11):cargo test -p victory-gpu --lib -- ambientgives 21 passed, the WARP test of the bound among them.cargo clippy -p victory-gpu --all-targets -- -D warningsreports 5 errors, all inhost/font.rs,host/menu.rsandhost/panel.rsfrom main's F1/F3 panel merge, none from this PR.AI use: Claude Code (Claude Opus 5.5) read the code path, ran the checks and wrote this.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.