fix(ambient): add opt-in chromatic probe-garbage scrub (VICTORY_AMBIENT_CHROMA_SCRUB=1) #280
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/TaynanGT--Vice-Tay!280
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-280"
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?
@Vladimir-Human on GitHub · 2026-11-27 13:32 UTC · original
Vladimir-Human:fix/ambient-chroma-spike-guard→main· +443 −3 · 2 files · 1 commits · openSummary
Split out from #255 per review feedback so chromatic probe-garbage filtering can be evaluated independently and stays strictly opt-in (OFF by default).
When
VICTORY_AMBIENT_CHROMA_SCRUB=1is set alongsideVICTORY_AMBIENT,ambient.rs'sraisepass drops three additional chromatic probe-garbage signatures left by unbuilt/stale screen probes (related to #168):was.b > 2.5 * was.g && was.b > was.r && was.b > 0.02, ported fromVIctory-NVIDIA826ba15) which otherwise bypass the luminance cap (LUMA.b = 0.0722).was.g > 2.5 * max(was.r, was.b) && was.g > 0.02).was.r < 0.35 * min(was.g, was.b) && max(was.g, was.b) > 0.02).When
VICTORY_AMBIENT_CHROMA_SCRUBis unset or not1(the default), bit 1 of the existingproberoot constant (words[11]) is0, preserving exact upstreamambient.rsbehavior with zero root-signature or PSO changes (existing lightprobe stats check(probe & 1u) != 0).Changed Files
crates/victory-gpu/src/ambient.rs: opt-inVICTORY_AMBIENT_CHROMA_SCRUB=1switch, guarded chroma-spike checks inRAISE, unit test (chroma_scrub_is_opt_in), and a 12-tone D3D12 hardware + WARP test (raise_opt_in_chroma_scrub_filters_spikes_and_preserves_scene_tones_on_hardware_and_warp).crates/victory-gpu/src/indirect.rs:#[cfg(test)]pub(crate)visibility onWarpHarness::onfor test reuse.Verification
Verified on local D3D12 hardware (NVIDIA GeForce RTX 4070 SUPER) and WARP (
VICTORY_D3D12_DEBUG=1,--test-threads=1,0D3D12 debug layer errors):cargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default &--features diagnostics): 0 warnings.cargo test -p victory-gpu --locked ambient::tests -- --test-threads=1(default &--features diagnostics): 9/9 passed on both hardware and WARP, confirming in bothscrub_on=false(default) andscrub_on=true(VICTORY_AMBIENT_CHROMA_SCRUB=1):cargo run -p xtask --locked -- policy&cargo test -p xtask --locked: 11/11 passed.227d26b58btob06b3ca07d@TaynanGT on GitHub · 2026-11-27 13:37 UTC · original
@Vladimir-Human This is the right scope for a separate image test. Use the same foliage move with the flag off and on, plus a shot containing deliberate violet or cyan light. The 12-tone test gives us a synthetic reference for what the filter is supposed to preserve.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.