ambient: window haze fix, off by default (upstream e5d2921, 5e09c3f) #67

Manually merged
github merged 2 commits from github-bot/gh-67 into gh-pr/67/base 2026-12-06 00:43:38 +00:00 AGit
Owner

@⁠Kal0s-design on GitHub · 2026-12-05 19:56 UTC · original
Kal0s-design:port/window-haze → main · +85 −4 · 5 files · 2 commits · merged 2026-12-05 22:29 UTC

From upstream ReVIctory (e5d2921 and its review follow-up 5e09c3f, authors kept). Its author tested it on an RDNA 2 card with ray tracing off, so it's for the AMD cards this fork targets.

With ray tracing off, the lighting stand-in's air and glass volume clamps only act on columns whose stencil says interior. A window or open door seen from inside shows the outdoors, so the room's air in front of the glass kept the window's unshadowed light, a white haze over windows shaped by the froxel grid. With the switch on and most of the view indoors (the interior share of the cached stencil, computed once per frame by the mean pass), those columns are bounded like the room, but only up to the window's depth, so fog and godrays outside stay as they were. It's off unless VICTORY_AMBIENT_WINDOW_AIR=1, and the F1 menu has it under Lighting as "Window haze fix".

Porting notes. The menu's switch list is a slice here (as in upstream's 8bff52b, and in #66), so adding an entry doesn't need the count changed. This fork's Dev tab lists the switch among its lighting stand-in internals, now 18. The new per-frame value goes in the stats buffer at offset 48, which is free in this fork's shaders too (0 to 16 and 64 to 192 are used).

Clippy -D warnings is clean in both of the Lint workflow's runs, and the ambient, live and overlay tests of victory-gpu pass (31), the_passes_compile among them, so the ambient shaders still compile. I couldn't check the picture here, I'm on one NVIDIA desktop card and don't run the game for this.

AI-assisted: yes

🤖 Generated with Claude Code

**@⁠Kal0s-design** on GitHub · 2026-12-05 19:56 UTC · [original](https://github.com/VGLALALA/ReVictory-RDNA3/pull/67) `Kal0s-design:port/window-haze` → `main` · +85 −4 · 5 files · 2 commits · merged 2026-12-05 22:29 UTC From upstream ReVIctory (e5d2921 and its review follow-up 5e09c3f, authors kept). Its author tested it on an RDNA 2 card with ray tracing off, so it's for the AMD cards this fork targets. With ray tracing off, the lighting stand-in's air and glass volume clamps only act on columns whose stencil says interior. A window or open door seen from inside shows the outdoors, so the room's air in front of the glass kept the window's unshadowed light, a white haze over windows shaped by the froxel grid. With the switch on and most of the view indoors (the interior share of the cached stencil, computed once per frame by the mean pass), those columns are bounded like the room, but only up to the window's depth, so fog and godrays outside stay as they were. It's off unless VICTORY_AMBIENT_WINDOW_AIR=1, and the F1 menu has it under Lighting as "Window haze fix". Porting notes. The menu's switch list is a slice here (as in upstream's 8bff52b, and in #66), so adding an entry doesn't need the count changed. This fork's Dev tab lists the switch among its lighting stand-in internals, now 18. The new per-frame value goes in the stats buffer at offset 48, which is free in this fork's shaders too (0 to 16 and 64 to 192 are used). Clippy -D warnings is clean in both of the Lint workflow's runs, and the ambient, live and overlay tests of victory-gpu pass (31), the_passes_compile among them, so the ambient shaders still compile. I couldn't check the picture here, I'm on one NVIDIA desktop card and don't run the game for this. AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With ray tracing off, the air (`clear_air_ext`) and alpha/glass
(`bound_alpha_ext`) volume clamps only act on columns whose exact stencil
says interior. A window or open door seen from inside shows the outdoors,
so its column was left untouched, and the room's air in front of the
glass kept the window's unshadowed light: a white haze over every window,
shaped by the froxel grid (soft at volumetrics High, stepped blocks at Low).

Now, when most of the view is indoors (16x9 grid of the cached stencil,
smoothstep 0.45..0.75), those columns are bounded like the room. Outdoor
views and shop windows seen from the street are unchanged (low indoor
share). Live switch in F1 > Lighting > "Window haze fix"
(VICTORY_AMBIENT_WINDOW_AIR, on by default; 0/off restores the old gate).

Tested on an RX 6800 XT, Series S profile, FSR 3.1 quality, RT off:
the bar's windows go from white blocks to the outdoors seen clearly,
toggling live.
- The indoor share is no longer recomputed by every threadgroup: `mean`
  stores the interior share of its 64x36 cells once per frame in
  `stats[INDOOR_AT]` (48, unused so far) and the air/alpha passes read it.
- Window columns are bounded only up to the opening's depth: the farthest
  interior surface around the column (the wall or frame, rings of the
  exact stencil cache out to ~140 px of 640), compared with the froxel
  slice's depth. Outdoor fog and godrays beyond the window are left alone.
  The title's slice distribution is not available to the stand-in, so an
  exponential layout from the near plane to 128 m is assumed, with a
  0.95..1.15 fade around the window.
- VICTORY_AMBIENT_WINDOW_AIR is off unless set to 1/on.
- Rebased on main; the switch is listed in the Dev tab's lighting
  stand-in tunables.

Ported to ReVictory-RDNA3 together with upstream e5d2921: the menu's
switch list is a slice here, and this fork's Dev tab lists the switch
among its lighting stand-in internals (now 18). Stats offset 48 is
unused in this fork's shaders as well (0..16 and 64..192 are taken).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 20:02:35 +00:00
github-bot changed target branch from main to gh-pr/67/base 2026-12-05 22:33:12 +00:00
github manually merged commit 0b7e1d9612 into gh-pr/67/base 2026-12-06 00:43:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.