victory-gpu: add VICTORY_AMBIENT_FLOOR and NaN/Inf guard in ambient pass #69
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!69
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/69/head"
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?
@Androtim on GitHub · 2026-11-28 20:18 UTC · original
Androtim:feat/iter83-ambient-floor→main· +43 −4 · 1 files · 1 commits · merged 2026-11-29 04:46 UTCSummary
Hasusmogus/cool_fox@ba096f8incrates/victory-gpu/src/ambient.rs:parse_floorandfloor()(VICTORY_AMBIENT_FLOOR, defaults to0.0so default look is unchanged unless explicitly opted in).Setroot constants from15to16dwords (fillin slot 15 onRole::Resolve).any((asuint(found) & 0x7f800000u) == 0x7f800000u) ? 0.0 : max(found, 0.0)) plusmax(found, float3(1.0, 0.98, 0.94) * fill * open)clamping.floor_settingsunit test covering default (0), custom values, and clamping.xtask policy:299 files okxtasktests:6 passed; 0 failedclippy(default and--features diagnostics): 0 warningsvictory-gpuambient::tests:8 passed; 0 failed(includesfloor_settingsandthe_passes_build)--release -p victory --bin victory+objdump -p: clean build, Windows system DLLs only6c288dbRig Specs Tested On
Intel Core i7-13700FNVIDIA GeForce RTX 4060 Ti (8 GiB VRAM)32 GiBWindows 11 Build 26300, NVIDIA driver32.0.16.2124Run Settings & Profile
--features diagnostics --release(D:\victory-data\verify-runs\pr69-ambient-floor-r2)verify-world.ps175s live open-world GPU soak with defaultVICTORY_AMBIENT_FLOOR=0andVICTORY_CACHE_DIR=D:\victory-data\cache-miniviMeasurements & Verification
pr69-ambient-floor-r2,first_world_frame=8546): 11/11 gates PASS11.3 fpsmedian (9.96 fpsmean,0.7 fpsmin),88.55 msmedian frame time (preparing 43.65 ms,GPU 1.35 ms,copyback 7.25 ms,max_draws=11479across16windows;+2.40 fpsvs8.9 fpsbaseline)5785 MBmax VRAM (5757 MBmedian) /6839 MBmin budget (0 MBover budget;-79 MBvs5864 MBbaseline)43759textures uploaded,1884final waiting textures (-5237vs7121baseline),260.5median pipeline drops (261.0baseline),mapped()rate29.48 ms/s(longest31.5 ms)20/24lit PNGs (luma=105.09,edge_energy=7.0,near_black=1.44%,magenta=0.0%),0crashes (no_host_texture_errors=0,untranslated_shaders=2); inspectedframe-8578.pngandframe-9226.png— sharp deck/under-deck lighting, glass reflections, water, and UI with zero artifacts.pr69-ambient-floor) passed 10/11 gates (10.8 fps,5847 MBVRAM) with transient274pipeline drops vs261.0baseline (stderr.logconfirmed RT-off skips and 214 cleanCS_RayMissambient dispatches); clean rerunpr69-ambient-floor-r2passed all 11/11 gates.@Androtim on GitHub · 2026-11-28 21:03 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Clean, minimal port of
VICTORY_AMBIENT_FLOORand the IEEE-754 bit-mask NaN/Inf guard incrates/victory-gpu/src/ambient.rs.SOURCE,after):RS,cbuffer Set,words, andSetComputeRoot32BitConstantsare all consistently expanded from15to16dwords (total root signature size 22 dwords, well within D3D12's 64-dword limit).words[15](fill) is populated fromfloor().to_bits()forRole::Resolveand remains0.0for other roles.raise):any((asuint(found) & 0x7f800000u) == 0x7f800000u) ? 0.0 : max(found, 0.0)reliably filters NaN/Inf and negatives without relying on fast-mathisnan/isinf.max(found, float3(1.0, 0.98, 0.94) * fill * open)matches the constant stand-in tint and is a no-op whenVICTORY_AMBIENT_FLOORis unset/0.parse_floor,floor,floor_settings): Rejects empty, non-positive, NaN, and Inf inputs; unit tests cover these cases.parse_floorandfloorwere inserted betweenair()'s doc comment (/// The most the air scatters...) andfn air() -> f32, attachingair()'s doc comment toparse_floorinstead ofair. Movingparse_floor/flooraboveair()'s doc comment (or belowair()) will keep the docs aligned.Since this modifies the
ambient.rsHLSL compute shader and D3D12 root signature (and the PR's soak run only exercised the defaultVICTORY_AMBIENT_FLOOR=0path), flagging for a quick local GPU smoke test including a non-zeroVICTORY_AMBIENT_FLOORcheck before merge.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-29 04:46 UTC · original
Automated RTX 4060 Ti 8 GB A/B hardware verification passed (
playtest/wave2vsorigin/main1ab5d84):cargo test(RTX 4060 Ti):victory-shaderlds_sub(1/1),emit::wave64_tests(14/14),victory-gpu(505/505) — 520 passed, 0 failed.scripts/verify-world.ps1, DLSS Quality + golden autosave):77.25 ms) vs 3.20 fps (308.8 ms) baseline (+10.25 fps / 4.2x faster)max_draws=3122vs29940crashes /0DRED6174 / 6903 MB(-25 MBvs baseline,0 MBover budget)final_waiting=7638vs12258(-4620)frame-7969.png,frame-8409.png), no regressions vsorigin/main.