ambient: bound the light of particles and dust indoors (VICTORY_AMBIENT_ALPHA) #186
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!186
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-186"
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?
@Spel0 on GitHub · 2026-12-02 13:33 UTC · original
Spel0:fix/particle-fog→main· +76 −3 · 4 files · 1 commits · merged 2026-12-02 16:13 UTCWhat this fixes
In some indoor bar scenes the picture fills with a pale fog and white specks: dust, smoke and transparent surfaces are lit as if they were under the open sky. With
VICTORY_AMBIENT_ALPHA=1the same interiors are clear, with no measurable frame-time cost in the captures below.Before — bar interior with the particle haze and white specks:
After — bar interior with
VICTORY_AMBIENT_ALPHA=1:What was wrong
The title lights transparent surfaces and particles from a 32x16x64 volume in front of the eye:
CS_GatherAlphaVBuffer->CS_ShadeAlpha->CS_VarianceFilterAlpha->CS_SpatialFilterAlphaWhen the ray-tracing structure builder is off (or its rays find nothing), every ray in that chain falls back to the open sky. Indoors the volume therefore holds sky radiance, and glass, dust and smoke are lit as if they were outdoors. The existing
VICTORY_AMBIENT_AIRbound only covers the air volume (CS_AccumulateLocalLightInscatteringVolume); the alpha volume was left unbounded, so the white specks and the haze remained.This is the same mechanism reported in the other VIctory trees; the volume was already known, but this fork's stand-in did not touch it.
Change
ambient::Role::AlphaforCS_SpatialFilterAlpha.ALPHA; R11G11B10, 3D), and is bounded right after the program by the same pass that bounds the air's light.VICTORY_AMBIENT_ALPHA=<multiple>: default1(on),0leaves the title's own output. Also listed inrun.conf.default/ the F1 menu as0|0.5|1|2|4.The bound runs only when the ambient stand-in is active:
VICTORY_AMBIENTis not off, and either the BVH builder is not running orVICTORY_AMBIENT_RTis set. That is the same condition as the other ambient bounds.Tested
Reporter's machine and settings:
With
VICTORY_AMBIENT_ALPHA=1the bar interiors are clear in play.VICTORY_AMBIENT_ALPHA=0restores the title's own output for comparison.Not tested here: other GPUs, other scenes, a long session, or the
VICTORY_AMBIENT=constant:path (like the air bound, the alpha bound is skipped there).Files
crates/victory-gpu/src/ambient.rs—Role::Alpha, the setting, the bound, and testscrates/victory-gpu/src/draw.rs— role table/slot and 3D target validationrun.conf.default,README.md— the settingCredits
The alpha-volume bound was first implemented in KyleS98/VIctory-Neo (
a6e85c6) and ProjectLeonida/mandy (915f7654,dc644c6); hotscarlett (59ed272) and skornuta/victory-stas (bad4ac58) ported and tested it under the sameVICTORY_AMBIENT_ALPHAname. This PR adapts it to this tree's stand-in roles and dispatch routing.Written with AI assistance (DeepSeek V4.1 Flash via OpenCode).
@kyle41313 on GitHub · 2026-12-02 14:19 UTC · original
Tested this PR on another card and scene. It fixes the same fault there.
Setup. RX 9070 XT, RADV, Proton Experimental 11.0, ray tracing off (
VICTORY_BVH_BUILDER=0). Built fromd044248plus this PR's commit (e5a0032), withVICTORY_AMBIENT_ALPHA=1. The build also carried our three glass fixes (#193, #194, #195), which touch other code.Scene. The player's house in an early open-world save. Without the bound, the floorboards, beds and door frames show a blue-white veil, and white specks float in the rooms.
Result. With this PR the veil and the specks are gone. Sunlit window glass looked the same as with the bound at 2. That was checked by eye in game, not measured.