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

Manually merged
github merged 3 commits from github-bot/gh-394 into gh-pr/394/base 2026-12-03 14:28:01 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 13:21 UTC · original
Androtim:feat/ambient-alpha-and-nort-preset → main · +1066 −53 · 7 files · 3 commits · merged 2026-12-03 14:25 UTC

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** on GitHub · 2026-12-03 13:21 UTC · [original](https://github.com/Androtim/MiniVI/pull/394) `Androtim:feat/ambient-alpha-and-nort-preset` → `main` · +1066 −53 · 7 files · 3 commits · merged 2026-12-03 14:25 UTC ## 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.)*
- victory-gpu (ambient.rs, draw.rs): port Role::Alpha (CS_SpatialFilterAlpha, VICTORY_AMBIENT_ALPHA, default 1) for direct and indirect dispatches from lobomfz/VIctory-xmem PR #186 (GPL-3.0), plus bound_alpha outdoor tree-silhouette block clamping fix, luminance-preserving room-hue tinting, and >900 m sky pixel skip in raise from ReTerryDavis/ReVIctory commit 40b5f9c (GPL-3.0).

- victory-loader, victory (rt_preset.rs, run.rs): port VICTORY_RT_PRESET (balanced/performance/nort) from ReTerryDavis/ReVIctory commit 40b5f9c (GPL-3.0) with clean-room build hash + 256-byte BLAKE3 + field invariant checks; auto-enable Preset::NoRt when RT is off with VICTORY_RT_PRESET=off kill switch.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 13:22:00 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-03 13:33 UTC · original

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).
**@⁠Androtim** on GitHub · 2026-12-03 13:33 UTC · [original](https://github.com/Androtim/MiniVI/pull/394#issuecomment-7379997710) 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).
- Gate ambient::on(), alpha_on(), after(), without_depth(), around(), mirror::light(), and draw::sky_miss_left_out() on !hwrt::active() (via title_rt_active() / explicit policy checks) so VICTORY_AMBIENT / VICTORY_AMBIENT_ALPHA never interfere with active VICTORY_HW_RT=1 (DXR 1.1) runs while preserving fallback on non-DXR GPUs.
- Add policy unit tests in ambient.rs (standin_and_alpha_stay_disabled_when_rt_active) and draw.rs (sky_miss_skip_respects_builder_specular_and_kill_switch) covering active HW-RT and SW-RT gating.
- Return (Preset, Patched) from rt_preset::apply_asked so apps/victory/src/run.rs resolves VICTORY_RT_PRESET once.
github-bot changed target branch from main to gh-pr/394/base 2026-12-03 14:26:21 +00:00
github manually merged commit 1d4b0d0300 into gh-pr/394/base 2026-12-03 14:27:54 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!394
No description provided.