feat(gpu/ambient): bound near-field air cap, scrub per-channel, add probe outlier filter #263
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/263"
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?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T21:51:23Z.
Summary
t0depth SRV descriptor range incrates/victory-gpu/src/ambient.rsasDESCRIPTORS_VOLATILEso passes that bind an image UAV handle in that slot (keepandmean) avoid static-descriptor type mismatch validation errors.clear_airbymin(cells_luma, seen_luma)so bright menus, lamps, or outdoor history do not flood dark interiors with milky haze while preserving window-to-exterior interpolation.raisefor bothfoundandwas.VICTORY_AMBIENT_PROBE_OUTLIERS=1support (RAISE_OUTLIERSvariant) to smoothly attenuate unusually bright dim-floor probe outliers while preserving the bounded radiance estimate when ray-tracing structures are unbuilt.RAISE,RAISE_OUTLIERS, andAIR.Verification
xtask policy: passed (315 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu ambient:: -- --test-threads=1: passed (14 passed, 0 failed, 1 ignored)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: passed (0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --features diagnostics --all-targets -- -D warnings: passed (0 warnings)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T22:03:13Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Changes in
crates/victory-gpu/src/ambient.rsare clean, well-scoped, and CI is passing. Because this modifies the embedded HLSL compute shaders (RS,clear_air,raise,RAISE_OUTLIERS) and D3D12 root signature descriptor flags, a local real-GPU smoke test is warranted before merging.Technical Notes
RS): Addingflags=DESCRIPTORS_VOLATILEtoSRV(t0)is valid for RS 1.1 /cs_5_1and avoids D3D12 validation mismatches whenkeepandmeanbind the image UAV handle in the depth slot without accessingt0.clear_air): Clampingroom = min(cells_luma, seen_luma)beforelerp(room, seen_luma, far)prevents a bright screen mean (menus/lamps) from washing out dark interiors near the camera while preserving near-to-far interpolation toward bright windows. Division byhasremains safe sincecap >= 0andhas > cap.raise): Switching fromany(...)to component-wise ternary scrubbing preserves valid channels if a single channel is NaN/Inf/negative; scrubbingwasafterunpack(light[p])is a cheap defensive guard.RAISE_OUTLIERS/VICTORY_AMBIENT_PROBE_OUTLIERS=1):VICTORY_AMBIENT_PROBE_OUTLIERS=1and dispatched only when!crate::pipeline::builder_runs(), falling back to&pass.raiseon compile failure.wasis unpacked from RGB9E5 (<= 65408.0) andtop >= 1e-6,capScaleis strictly positive (>= 1e-6 / 65408.0), sofound / capScalecannot divide by zero or overflowf32, and multiplying bycapScaleyieldslerp(was * capScale, min(was * capScale, found), reject).retained = (was * capScale) * (1.0 - reject)for theonce > 0.0path ensures rejected outliers do not inflate the title's bounce share incells[SHARES + ...].diffuse_probe_outlier_and_core_shaders_compileverifies HLSL compilation ofRAISE,RAISE_OUTLIERS, andAIR;clear_air_cap_bounds_dark_interiorsandscrub_channel_keeps_valid_channelscover the scalar logic.Verdict
needs-gpu-test— logic looks sound and CI passes; verify on a real GPU (including D3D12 debug layer if available) with both default settings andVICTORY_AMBIENT_PROBE_OUTLIERS=1.Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-30T22:52:57Z.
Dual Verification Suite hardware check on RTX 4060 Ti (Wave 11 stacked #262 + #263 + #267 on origin/main
85d4f80, 45s in-world per profile):