ambient: keep VICTORY_AMBIENT_RT opt-in with ray tracing (#61) #75

Closed
github-bot wants to merge 1 commit from github-bot/gh-75 into main AGit
Owner

@⁠BlueCatsz on GitHub · 2026-12-01 16:02 UTC · original
BlueCatsz:fix/ambient-rt-opt-in → main · +17 −6 · 1 files · 1 commits · closed without merging

Fixes #61.

Summary

  • Remove the VICTORY_BVH_BUILDER=1 fallback in crates/victory-gpu/src/ambient.rs (rt_band()) so VICTORY_AMBIENT_RT stays opt-in when unset, matching its existing doc comment (unset: off, the title's own light whenever the builder runs).
  • Extract rt_band_from(Option<&str>) so unset/"0"/band parsing can be covered directly by deterministic unit tests without mutating process-wide OnceLock state.
  • Add assertions in ambient::tests::the_band_with_rays for parse_band("0") and rt_band_from(None | Some("0") | Some("0.7,1.5")).

Why

With hardware ray-tracing (VICTORY_BVH_BUILDER=1, on by default in run.sh), rt_band() fell back to "0.7,1.5" and ran all ambient stand-in passes (Resolve, Reflected*, Air) on top of the title's own traced indirect light. In dimly lit indoor scenes this crushed indirect lighting and turned interiors near-black, whereas setting VICTORY_AMBIENT_RT=0 restored expected indoor lighting. Users on the software node test who still need the band can pass VICTORY_AMBIENT_RT=0.7,1.5 explicitly.

Verification

  • cargo --offline run -p xtask -- policy --staged (asset policy: 1 files ok)
  • cargo --offline test -p xtask -- switches (3 passed; 0 failed)
  • PKG=victory-gpu ./build.sh clippy --offline --lib (0 warnings in ambient.rs)
  • ./build.sh (release profile victory.exe compiled cleanly)
  • ambient::tests:: under proton-cachyos-slr + vkd3d-proton on RX 9070 XT (RADV GFX1201): 4 passed, 0 failed (roles_by_name, settings, the_band_with_rays, the_passes_build)
  • Live A/B check on RX 9070 XT (CachyOS, 1440p, HW RT on): dim indoor scenes that rendered pitch black under default 0.7,1.5 rendered properly lit with VICTORY_AMBIENT_RT=0 (zero stand-in passes logged).

AI-assisted contribution (verified locally and on RX 9070 XT hardware).

**@⁠BlueCatsz** on GitHub · 2026-12-01 16:02 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/75) `BlueCatsz:fix/ambient-rt-opt-in` → `main` · +17 −6 · 1 files · 1 commits · closed without merging Fixes #61. ### Summary - Remove the `VICTORY_BVH_BUILDER=1` fallback in `crates/victory-gpu/src/ambient.rs` (`rt_band()`) so `VICTORY_AMBIENT_RT` stays opt-in when unset, matching its existing doc comment (`unset: off, the title's own light whenever the builder runs`). - Extract `rt_band_from(Option<&str>)` so unset/`"0"`/band parsing can be covered directly by deterministic unit tests without mutating process-wide `OnceLock` state. - Add assertions in `ambient::tests::the_band_with_rays` for `parse_band("0")` and `rt_band_from(None | Some("0") | Some("0.7,1.5"))`. ### Why With hardware ray-tracing (`VICTORY_BVH_BUILDER=1`, on by default in `run.sh`), `rt_band()` fell back to `"0.7,1.5"` and ran all ambient stand-in passes (`Resolve`, `Reflected*`, `Air`) on top of the title's own traced indirect light. In dimly lit indoor scenes this crushed indirect lighting and turned interiors near-black, whereas setting `VICTORY_AMBIENT_RT=0` restored expected indoor lighting. Users on the software node test who still need the band can pass `VICTORY_AMBIENT_RT=0.7,1.5` explicitly. ### Verification - `cargo --offline run -p xtask -- policy --staged` (`asset policy: 1 files ok`) - `cargo --offline test -p xtask -- switches` (`3 passed; 0 failed`) - `PKG=victory-gpu ./build.sh clippy --offline --lib` (`0` warnings in `ambient.rs`) - `./build.sh` (`release` profile `victory.exe` compiled cleanly) - `ambient::tests::` under `proton-cachyos-slr` + `vkd3d-proton` on RX 9070 XT (`RADV GFX1201`): **4 passed, 0 failed** (`roles_by_name`, `settings`, `the_band_with_rays`, `the_passes_build`) - Live A/B check on RX 9070 XT (CachyOS, 1440p, HW RT on): dim indoor scenes that rendered pitch black under default `0.7,1.5` rendered properly lit with `VICTORY_AMBIENT_RT=0` (zero `stand-in` passes logged). *AI-assisted contribution (verified locally and on RX 9070 XT hardware).*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 16:03:21 +00:00
github-bot closed this pull request 2026-12-01 21:37:00 +00:00
Author
Owner

@⁠BlueCatsz on GitHub · 2026-12-01 21:35 UTC · original

Landed on main via cherry-pick commit 1ccb580 — closing this PR as completed. Thanks for pulling it in!

**@⁠BlueCatsz** on GitHub · 2026-12-01 21:35 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/75#issuecomment-7326504715) Landed on `main` via cherry-pick commit 1ccb580 — closing this PR as completed. Thanks for pulling it in!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.