victory-gpu: settle ambient light mean by wall clock with jump snap #15
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15"
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-28T05:24:27Z.
## Summary
Adapts time-based indirect ambient settling from
VIctory-7900XTX(b4ba4bb/9576c45) intocrates/victory-gpu/src/ambient.rs(preservingVICTORY_AMBIENT_ONCE,VICTORY_AMBIENT_SPECULAR, and magenta/violet probe filtering):VICTORY_AMBIENT_SETTLE=<ms>[,<jump>[,<fresh_s>]](default250,3;0restores per-frame0.04step) so the slow mean inmean()converges at the same wall-clock rate regardless of frame rate instead of taking 2-4 seconds at 7-13 fps.jumpratio) and optionally rampsmostoverfreshseconds inraise()to prevent outdoor sky history bleeding into indoor rooms.b0root constants from 12 to 15 words (jump,fresh,dt), keepingu1/u2UAV layout unchanged.ambient::tests::settle_settingsandambient::tests::follow_is_frame_rate_independentalongside live D3D12 HLSL compile checkthe_passes_build.Rig Specs Tested On
Run Settings & Profile
diag@5fcb838(victory --release --features diagnostics)series-s(0.6666667internal scale)offDLSS quality(VICTORY_DLSS=1 VICTORY_DLSS_MODE=quality)offVICTORY_*Overrides:play.rsSETTINGSdefaults (VICTORY_AMBIENT=0.8,VICTORY_AMBIENT_AIR=1.5,VICTORY_AMBIENT_SPECULAR=1, defaultVICTORY_AMBIENT_SETTLE=250,3)Measurements & Verification
8.9-9.7 fpson steady balcony (103.2-112.6 ms,1.0 mstotal GPU across all passes including ambient);6.2 fpsoverall median across the 15-window boot-overlap capture while background pipelines finished compiling (874 -> 274being made; vsbaseline-main8.9 fpswhere only248remained at world entry)6,041 MBpeak VRAM /6,940 MBbudget (over = 0 MB, permemory of textures)42,588uploaded (1,884 MB), final waiting4,740(vsbaseline-main7,121),mapped()stall rate21.56 ms/s(vs26.99 ms/s)median luma = 105.3(vs103.2),near_black = 0.0%,edge_energy = 6.92,magenta = 0.0%; confirmedthe stand-in's mean of the light around settles by the clock (VICTORY_AMBIENT_SETTLE) ms=250.0 jump=3.0 fresh=0.00crashes,0no host textureerrorscargo +1.98.1-x86_64-pc-windows-gnu xtask policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu(450 passed; 0 failed; 36 ignored)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T06:04:11Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Clean, tightly scoped port of wall-clock ambient mean settling and brightness-jump snapping into
crates/victory-gpu/src/ambient.rs.RootConstants(num32BitConstants=15, b0)),cbuffer Setlayout (jump,fresh,dt), andSetComputeRoot32BitConstants(0, 15, ...)inafter()all match. Verified thatclear_air(L328),reflect_light(L381), andraise(L462) only readcells[CELLS].rgb, so repurposingcells[CELLS].aas seconds-since-jump (age) does not break other passes.VICTORY_AMBIENT_ONCE,VICTORY_AMBIENT_SPECULAR, and the magenta/violet probe filters inraise()remain intact. DefaultVICTORY_AMBIENT_SETTLE=250,3keepsfresh=0.0, whileVICTORY_AMBIENT_SETTLE=0restores the0.04per-frame step.settle_settingsandfollow_is_frame_rate_independentcover parsing and frame-rate independence alongsidethe_passes_build.Non-blocking Nit
after(),follow(role)callsframe_ms(role)forwords[8]and thenwords[14]callsframe_ms(role)a second time. AlthoughASKED.swap(now, Relaxed) == nowusually deduplicates the second call, a 1 ms clock tick between those two lines will overwriteLAST/DTwith1.0ms for that frame. Computinglet dt_ms = frame_ms(role);once inafter()(usingfollow_for(dt_ms, settle)anddt_ms / 1000.0) avoids the double call and millisecond-boundary race.Verdict
needs-gpu-test— This changes HLSL compute shaders (mean,raise), the compute root signature, and default ambient settling behavior (250,3when unset), so a local real-GPU smoke test is warranted before merging.Generated with Antigravity CLI (
agy).