feat(gpu,loader): add VICTORY_AMBIENT_ALPHA, sky fixes, and RT-off nort GI preset #394

Merged
Androtim merged 3 commits from upstream-pr/394 into main 2026-12-03 14:25:28 +00:00
Androtim commented 2026-12-03 13:21:08 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T13:21:08Z.


Summary

Ports two clean-room GPL-3.0 visual-fidelity and RT-off performance improvements from upstream lobomfz/VIctory-xmem (PR #186) and ReTerryDavis/ReVIctory (commit 40b5f9c):

  1. Indoor Alpha / Particle Volume Ambient Bound + Sky / Tree Fixes (crates/victory-gpu/src/ambient.rs, crates/victory-gpu/src/draw.rs):

    • Port Role::Alpha (ALPHA at table 1, dword 24, 32x16x64 R11G11B10_FLOAT volume) for CS_SpatialFilterAlpha under VICTORY_AMBIENT_ALPHA (default 1, 0/off disables), covering both direct and indirect compute dispatches (attributed to lobomfz/VIctory-xmem PR #186, GPL-3.0).
    • Add a dedicated bound_alpha compute shader pass with ReTerryDavis/ReVIctory 40b5f9c (GPL-3.0) fixes:
      • Outdoor tree-silhouette block clamping fix using global (gs_alpha_sky) and local (local_sky over 64x36 placed depth cells) sky fractions so columns seeing open sky behind foliage are not clamped into 32x16 blocks.
      • Saturation-aware energy(c) clamping plus luminance-preserving room-hue tinting (target_luma = min(top, dot(clamped, LUMA))) when clamping sky-miss froxels indoors.
      • Skip distant >900 m sky pixels in raise() to avoid unnecessary neighbor depth/gather/pack work on sky pixels. (Note: sky_local / sky_share from ReVIctory belong to its separate skies reflection pipeline not used in MiniVI; MiniVI's reflect_light already returns early at c.z >= 999.0.)
  2. RT-Off ScreenProbe GI / Shadow Subpass Cut (VICTORY_RT_PRESET, crates/victory-loader/src/rt_preset.rs, apps/victory/src/run.rs):

    • Port VICTORY_RT_PRESET (balanced, performance, nort) from ReTerryDavis/ReVIctory 40b5f9c (GPL-3.0) with clean-room verification (build hash b99f876b74d4a77f, 256-byte BLAKE3 digest 10cdf268..., and stock field invariants checked before VirtualProtect write at +0x6b4d860; zero binary bytes embedded in source).
    • Auto-enables Preset::NoRt when ray tracing is off (VICTORY_BVH_BUILDER and VICTORY_HW_RT off), with VICTORY_RT_PRESET=off (0 / stock) as kill switch:
      • Cuts ScreenProbe GI rays 8x (+0x08: 1.0 -> 0.125), max tile layers (+0x04: 4 -> 1), GI budget (+0x40: 24 -> 4), far-trace distances (+0xdc..+0xe4: 50.0 -> 0.0), and GI cache tier (+0xf8: 5 -> 3).
      • Disables RT shadow subpasses (+0xbf/+0xc0: 1 -> 0).
      • Preserves half-resolution reflection/SSR targets (+0x20/+0x24/+0x28 = 1) and Opaque/Water/Alpha reflection flags (+0xbc/+0xbd/+0xbe = 1) to avoid water trailing and 50% screen seams.

Automated Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu xtask policy (asset policy: 352 files ok)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask --locked (8 passed; 0 failed)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings (passed)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --all-features --locked -- -D warnings (passed)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-loader --lib --locked (66 passed; 0 failed, including 3 rt_preset::tests::*)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib ambient --locked -- --test-threads=1 (18 passed; 0 failed; 1 ignored, including HLSL/PSO compilation and bound_alpha math tests)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib draw::record_hash_tests --locked (4 passed; 0 failed)
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --locked (47 passed; 0 failed + 2 passed; 0 failed in census.rs)
  • (Note: build/unit-test verification only in this PR; live runtime FPS/capture testing is not included.)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5627325172 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/394). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T13:21:08Z. --- ## Summary Ports two clean-room GPL-3.0 visual-fidelity and RT-off performance improvements from upstream `lobomfz/VIctory-xmem` (PR #186) and `ReTerryDavis/ReVIctory` (commit `40b5f9c`): 1. **Indoor Alpha / Particle Volume Ambient Bound + Sky / Tree Fixes (`crates/victory-gpu/src/ambient.rs`, `crates/victory-gpu/src/draw.rs`):** - Port `Role::Alpha` (`ALPHA` at table `1`, dword `24`, 32x16x64 `R11G11B10_FLOAT` volume) for `CS_SpatialFilterAlpha` under `VICTORY_AMBIENT_ALPHA` (default `1`, `0`/`off` disables), covering both direct and indirect compute dispatches (attributed to `lobomfz/VIctory-xmem` PR #186, GPL-3.0). - Add a dedicated `bound_alpha` compute shader pass with `ReTerryDavis/ReVIctory` `40b5f9c` (GPL-3.0) fixes: - Outdoor tree-silhouette block clamping fix using global (`gs_alpha_sky`) and local (`local_sky` over `64x36` placed depth cells) sky fractions so columns seeing open sky behind foliage are not clamped into `32x16` blocks. - Saturation-aware `energy(c)` clamping plus luminance-preserving room-hue tinting (`target_luma = min(top, dot(clamped, LUMA))`) when clamping sky-miss froxels indoors. - Skip distant `>900 m` sky pixels in `raise()` to avoid unnecessary neighbor depth/gather/pack work on sky pixels. *(Note: `sky_local` / `sky_share` from `ReVIctory` belong to its separate `skies` reflection pipeline not used in MiniVI; MiniVI's `reflect_light` already returns early at `c.z >= 999.0`.)* 2. **RT-Off ScreenProbe GI / Shadow Subpass Cut (`VICTORY_RT_PRESET`, `crates/victory-loader/src/rt_preset.rs`, `apps/victory/src/run.rs`):** - Port `VICTORY_RT_PRESET` (`balanced`, `performance`, `nort`) from `ReTerryDavis/ReVIctory` `40b5f9c` (GPL-3.0) with clean-room verification (build hash `b99f876b74d4a77f`, 256-byte BLAKE3 digest `10cdf268...`, and stock field invariants checked before `VirtualProtect` write at `+0x6b4d860`; zero binary bytes embedded in source). - Auto-enables `Preset::NoRt` when ray tracing is off (`VICTORY_BVH_BUILDER` and `VICTORY_HW_RT` off), with `VICTORY_RT_PRESET=off` (`0` / `stock`) as kill switch: - Cuts ScreenProbe GI rays 8x (`+0x08`: `1.0 -> 0.125`), max tile layers (`+0x04`: `4 -> 1`), GI budget (`+0x40`: `24 -> 4`), far-trace distances (`+0xdc..+0xe4`: `50.0 -> 0.0`), and GI cache tier (`+0xf8`: `5 -> 3`). - Disables RT shadow subpasses (`+0xbf/+0xc0`: `1 -> 0`). - Preserves half-resolution reflection/SSR targets (`+0x20/+0x24/+0x28 = 1`) and Opaque/Water/Alpha reflection flags (`+0xbc/+0xbd/+0xbe = 1`) to avoid water trailing and 50% screen seams. ## Automated Verification - `cargo +1.98.1-x86_64-pc-windows-gnu xtask policy` (`asset policy: 352 files ok`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask --locked` (`8 passed; 0 failed`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings` (passed) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --all-features --locked -- -D warnings` (passed) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-loader --lib --locked` (`66 passed; 0 failed`, including 3 `rt_preset::tests::*`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib ambient --locked -- --test-threads=1` (`18 passed; 0 failed; 1 ignored`, including HLSL/PSO compilation and `bound_alpha` math tests) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib draw::record_hash_tests --locked` (`4 passed; 0 failed`) - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --locked` (`47 passed; 0 failed` + `2 passed; 0 failed` in `census.rs`) - *(Note: build/unit-test verification only in this PR; live runtime FPS/capture testing is not included.)*
Androtim commented 2026-12-03 13:33:29 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T13:33:29Z.


Triage (1ce4e987, CI check PASS):

  • Clean-room policy verified (xtask policy pass, BLAKE3 + field invariant checks before patch, zero embedded bytes, clean =0/off kill-switches on both VICTORY_AMBIENT_ALPHA and default-on RT-off VICTORY_RT_PRESET=nort).
  • Holding auto-merge for Gate 2 Reasoning Audit (#282) + Gate 3 plain --release A/B (FPS delta, 0 crashes/DRED) + --features diagnostics visual PNG verification (indoor alpha volume, outdoor tree silhouettes, and SSR/water parity).
<!-- greyfinch-sync:Androtim/MiniVI:comment:7379997710 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/394#issuecomment-7379997710). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T13:33:29Z. --- Triage (`1ce4e987`, **CI `check` PASS**): - Clean-room policy verified (`xtask policy` pass, BLAKE3 + field invariant checks before patch, zero embedded bytes, clean `=0`/`off` kill-switches on both `VICTORY_AMBIENT_ALPHA` and default-on RT-off `VICTORY_RT_PRESET=nort`). - Holding auto-merge for **Gate 2 Reasoning Audit (`#282`)** + **Gate 3 plain `--release` A/B** (FPS delta, `0` crashes/DRED) + **`--features diagnostics` visual PNG verification** (indoor alpha volume, outdoor tree silhouettes, and SSR/water parity).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Androtim/MiniVI!394
No description provided.