GPU: bound ambient air inscattering by local surface luminance (#1395) #1930
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1930"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dheerajc8073 on 2026-11-29T03:10:44Z.
Fixes #1395
What it changes
In
crates/victory-gpu/src/ambient.rs,clear_airruns afterCS_AccumulateLocalLightInscatteringVolume(Role::Air) to cap volumetric air inscattering and prevent sky probes from flooding interior rooms with daylight haze when ray tracing is off.Previously,
clear_aircalculated the inscattering cap as:Because
far = 0at near slices,capevaluated toair * cells[CELLS]near the camera. In dark interiors (Jason's house at night, garages, mod shops, bathrooms/showers) and UI menus (wardrobe menu, Pro Builds menu),cells[CELLS]is elevated by UI text, local lamps, or outdoor history. This allowed probe sky light to penetrate dark interiors without being clamped, producing a milky green veil and washing out contrast (#1395).This PR:
min(cells_luma, seen_luma):How it was tested
VICTORY_AMBIENT=0.8,VICTORY_AMBIENT_AIR=1.5,VICTORY_AMBIENT_SPECULAR=1).clear_air).cargo testpassed for the crates it touches: yesChecked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-29T03:28:47Z.
Review: APPROVED
Tested locally merged onto
main(568c5e5).crates/victory-gpu/src/ambient.rs(no new asset-policy violations; only the pre-existinglower.rssize limit onmain568c5e5).cargo test -p victory-gpu --lib ambient::passed (12 passed; 0 failed, including the newclear_air_cap_bounds_dark_interiorstest) with 0 warnings inambient.rs.Clean ambient air inscattering bound for dark interiors. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by amazedturnip on 2026-11-29T05:38:59Z.
Tested on RTX 5070 Ti 16 GB (Series X 1440p DLSS, RT off, VICTORY_AMBIENT=0.8 / AMBIENT_AIR=1.5 / AMBIENT_SPECULAR=1). Noticeably cleans up the washed-out interior ambient veil with zero visual artifacts across 20+ min play.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T09:45:59Z.
I tested this PR’s near-slice cap by porting the formula to an instrumented v2026.11.28.01 player build and alternating the two formulas every 10 seconds in the same process. Both paths dispatched. This is a daylight living-room sample on an RTX 4070 Ti SUPER, Series X, 2560×1440→3840×2160, DLSS Quality, 2× frame generation, BVH off, VICTORY_AMBIENT=1.
The hall had four complete intervals per setting. The window had two original and three proposed intervals. In these views the cap produced little visible change. A darker room where the near-volume input actually hits the cap would make a useful second test. The separate night-house report and the 5070 Ti result above may be covering that case.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dheerajc8073 on 2026-11-29T16:29:02Z.
Thank you @Dukestar69 for the review and test verification on RTX 5090 + WARP, and thank you @amazedturnip and @Yoshi-233 for the thorough in-game and benchmark testing!
The data from @Yoshi-233 confirms the intended design: in bright daylight halls and sunlit windows, surface luminance is sufficiently high that the near-slice cap does not restrict inscattering (preserving luminance within ~0.4%), whereas in dark interiors, garages, and night scenes, it successfully caps the sky probe inscattering that previously caused the milky veil as confirmed by @amazedturnip. Ready for merge whenever maintainers are ready.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-30T09:21:51Z.
Tested in game on interiors with RT off: a restaurant with street windows and the barbershop next door, in the city. Series S, DLSS performance, frame generation off. RTX 3090 24 GB, i9-14900K, 32 GB. A player walked the rooms while I took stills and 10-frame bursts.
Builds: v2026.11.29.05 (
41adb551) against the same with this PR merged (23e8243c).victory playdefaults, soVICTORY_AMBIENT=0.8andVICTORY_AMBIENT_AIR=1.The floating white dust specks in the same rooms are a separate thing that this PR leaves alone. #2156's opt-in removes them, so the two complement each other.
🤖 Generated with Claude Code