GPU: bound ambient air inscattering by local surface luminance (#1395) #1930
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!1930
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@dheerajc8073 on GitHub · 2026-11-29 03:10 UTC · original
dheerajc8073:fix/ambient-air-indoor-haze→main· +42 −2 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCFixes #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
@Dukestar69 on GitHub · 2026-11-29 03:28 UTC · original · approved these changes
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).
@amazedturnip on GitHub · 2026-11-29 05:38 UTC · original
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.
@Yoshi-233 on GitHub · 2026-11-29 09:45 UTC · original
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.
@dheerajc8073 on GitHub · 2026-11-29 16:29 UTC · original
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.
@nick0451 on GitHub · 2026-11-30 09:21 UTC · original · edited 2026-11-30 09:22 UTC
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