Ambient: bound the sky's light in reflections where the miss program has no depth #63
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/63"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by wasonidas on 2026-11-27T15:39:05Z.
Problem
On an RTX 5080 (Series S and Series X profiles)
CS_RayMiss_de6b91a6has a 1x1 texture at its depth's place in every frame of the world, so the reflections estimate (VICTORY_AMBIENT_SPECULAR) never ran for it: indoors, floors and glass mirrored the sky.The alpha layer (glass, decals, paper on a wall) takes the sky's light twice when its rays find nothing, from
CS_DeferredFallbacksAlpha_SkyProbeand fromCS_RayMiss, into the imageCS_TemporalResolve1_Alphareads. Paper on the wall of the first playable room showed the sky at 10 to 30 where the room around sends out 0.01 to 0.1.Change
VICTORY_AMBIENT_SPECULAR_NO_DEPTH=<multiple>,0leaves the title's sky light. It acts only withVICTORY_AMBIENT_SPECULARon.VICTORY_AMBIENT_SPECULAR_ALPHAunset orbound[:<multiple>];1takes the estimate as opaque surfaces do,0leaves it as the title has it. A bound needs neither the surface's depth nor its normal, so it also works on water, where the estimate cannot be used.VICTORY_CAPTURE_WORLD_EVERY=<frames>sets how often a frame of the world is saved in the diagnostics build (8, as before; a saved frame takes 45 to 55 ms more, which was the 95th percentile of every run measured with captures), andVICTORY_AMBIENT_SECONDcaps the resolve's second image of light (a probe, off unless asked for).Outdoors the light around is of the sky's order and the bound does little; indoors it takes the sky away.
Relation to #29
#29 drops violet leftovers in the ambient
raise. This bounds the sky's light in reflections, another path; it applies beside #29's lines without touching them.Measured
RTX 5080, Ryzen 7 9800X3D, 32 GB, Series X profile, 2560x1440, DLSS Quality, diagnostics build, 294 s unattended run of the prologue with this change:
This is a picture fix and comes with no frame-rate claim: there was no A/B of this change alone, and the cost of the two compute passes it adds (
bound,cap) was not isolated. The run above saved every 8th frame, each about 50 ms.Checks
main(d12eb1b2) without conflicts.cargo check --workspace --all-targets --locked: passes.cargo test -p victory-gpu --lib -- ambient::tests capture::tests draw::tests(card-free ones, including the three new settings tests) andcargo test -p xtask(asset policy): pass.ambient::tests::the_passes_build, which compiles the passes on a card. No GPU run was made on top of currentmain; the measurements above are from our RTX 5080 branch, whose base is this repository's9d6300fa.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1tsethan on 2026-11-27T23:00:44Z.
Independent Windows validation of PR #63.
Tested commit:
f60296e7ef1722c0d624ba7f46b27bf09459ebdd.cargo test --locked -p victory-gpu ambient::tests:: -- --nocapture --test-threads=1Exit: 0.
Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wasonidas on 2026-11-28T08:38:35Z.
Merged
main(63b902f) into this branch; it had one conflict, indraw.rs.What the conflict was.
mainnow gives the alpha layer the estimate by default (VICTORY_AMBIENT_SPECULAR_ALPHAon unless0): the dark patches on water turned out to be tiles the tile list had dropped, and without the estimate glass in a dark room mirrored the bright sky. This branch does something else with the same layer: it keeps the title's sky light and bounds it by the light around, which needs neither depth nor normal.How it is resolved. This branch's default is kept (unset: the bound).
VICTORY_AMBIENT_SPECULAR_ALPHA=1givesmain's estimate,0leaves the layer as the title has it. If you would rather keep the estimate as the default and have the bound as the opt-in, say so and I will turn it round.Checked.
cargo check --workspace --all-targetspasses;cargo test -p victory-gpu --lib ambient:: draw:: capture::: 16 passed, 1 ignored. The merged tree has not been run on a card: the figures in the description are from beforemain's lighting changes of 27 November.Two things from others that bear on this:
06bb6e728c7c99bf). I cannot tell from here whether the bound clears that case.Written with AI help (Claude Code).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T19:01:55Z.
Thanks for this. I'm closing it without merging: #124, merged now, adds the same bound for the reflections where the miss program has no depth (
VICTORY_AMBIENT_SPECULAR_BOUND), and the two conflict. If yours does something #124 doesn't, please rebase it on the current main and open a new pull request with just that part.Pull request closed