Reflections: clear the left-out miss program's output instead of leaving earlier frames' bytes (#2440) #2764
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2764"
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 milesah3ad on 2026-11-29T17:01:11Z.
Fixes #2440. Fixes #2224. Fixes #2272. Fixes #2643. Fixes #2661. Fixes #2758. Related: #2464 (suggested this approach), #2324, #2275 (the glass part).
Fixes the coloured blocks and smearing on glass from #2440, following the direction in #2464 (section 1).
Cause. Since
e2d7854e, the reflections' miss program (CS_RayMiss) is left out for the opaque and alpha layers (VICTORY_RAYMISS_KEEP=0, the white-grain fix for floors). Its output target then keeps whatever it held before. Every texel the screen-space resolve doesn't write shows earlier frames' bytes, which appears as blocks and smearing on windows, car paint and glass. Running only the alpha layer doesn't help, because glass is drawn in the opaque layer with the floors (#2534, closed).Change. In place of the left-out dispatch, the miss program's output (
ambient::MISS_LIGHT) is cleared to zero with the existing host UAV clear (list::clear_uav_on_host, nowpub(crate)). This covers both the direct and the indirect dispatch paths. Uncovered texels then hold "no reflection" instead of stale memory, and the floors keep the white-grain fix. The clear sets its own descriptor heaps, so the draw state rebinds the title's on the next bind (host_heaps_set = false).VICTORY_RAYMISS_ZERO=0restores the old behaviour.Tested. RTX 5080 16 GB, Ryzen 7 9800X3D, Series X 1440p, DLSS Quality, on
829188e9, scripted run through the opening and the boat scene:reflections' miss program left out: its output cleared to zero instead;VICTORY_RAYMISS_ZERO=0on the same build, the smearing is back;cargo check --release -p victorypasses on main plus this change. The diagnostics build needs #2593.🤖 Generated with Claude Code
https://claude.ai/code/session_01YPhfiX2HTdGjHQHvB9b9DE
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by jbr589 on 2026-11-29T18:36:15Z.
Verified on an RTX 3060 12 GB (issue #2758), Windows 11 driver 621.40, Series S, DLSS Performance, frame generation off, ray tracing off.
The orange/red garbage in reflections reproduces on the
v2026.11.29.01release (in a cutscene, on every reflective surface) and is gone with this change; the log showsreflections' miss program left out: its output cleared to zero instead, and reflections render clean.I couldn't check an interior floor in this cutscene (none visible), but clearing to zero instead of running
CS_RayMisskeeps the white-grain fix, so floors should not brighten (unlikeVICTORY_RAYMISS_KEEP=1).cargo build --release -p victorypasses;cargo test -p victory-gpu --lib→ 914 passed, 1 unrelated flaky test inwatch.rs(not touched by this change; passes in isolation).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-29T18:37:35Z.
Thanks @jbr589 for testing on the RTX 3060 / Series S. Good to have it confirmed on a second card and profile. I've added #2758 to the issues this fixes. On floors: our runs on an RTX 5080 kept the floors as they are on main (no brightening), since the floor fix itself is untouched.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NovNovikov on 2026-11-29T18:43:47Z.
Does the fix work on a new release?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-29T18:49:49Z.
@NovNovikov Yes. v2026.11.29.02 doesn't touch the reflection code (its 10 commits since
829188e9changelist.rselsewhere, not the miss-program path), and this PR still merges cleanly onto main, which is the .02 hotfix. So the glass blocks are still there on .02 without it, and this change clears them the same way on .02.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Eliauk0 on 2026-11-29T19:20:25Z.
Confirmed fixed, on both versions.
Config: 7800x3D, RTX 5070 Ti, driver 621.40,, Series X, 4K + DLSS Perf + FG 3x.
reflections' miss program left out: its output cleared to zero instead; floors unchanged.Thanks!
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-29T19:25:31Z.
Thanks @Eliauk0! That's the first confirmation on v2026.11.29.02, and with frame generation on. So far it's verified on an RTX 5080, a 3060 and a 5070 Ti, Series S and X, with no floor brightening.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by atorata on 2026-11-29T19:47:35Z.
Tested on Linux, RTX 3060 12 GB (Ampere), NVIDIA 620.73.04, CachyOS, Proton Experimental 11.0-20261112 with vkd3d-proton master
71cae091b. Series S, DLSS Quality (1280x720 to 1920x1080), FSR 3 frame generation 2x, ray tracing off. This PR applied on829188e(cleanly; it also applies cleanly onv2026.11.29.02/f889bb07).reflections' miss program left out: its output cleared to zero instead (VICTORY_RAYMISS_ZERO=0: not), and in a 60-frame burst along a busy road (tow truck, pickups, SUV, taxi, semi cabs, shop windows) no glass showed the blocks. Windows read as dark glass with a faint reflection.Not checked: indoor wooden floors specifically for the white grain, so I can't confirm that part on this card.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-29T19:49:31Z.
Thanks @atorata, that's the first Linux / vkd3d-proton confirmation, so the clear works through the Vulkan path too. With your report that makes four independent tests: RTX 5080, 3060 (Windows and Linux), 5070 Ti; Series S and X; .01 and .02.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-29T21:19:34Z.
AMD confirmation from @saltdam36 on #2224: RX 7800 XT, Series S, FSR upscaler (#1236) on,
VICTORY_RAYMISS_KEEPunset. Reflections in mirrors, windows and bottles are right, with no grain on floors, faces or eyes. That makes five setups: RTX 5080, 3060 (Windows and Linux/vkd3d-proton), 5070 Ti and RX 7800 XT; Series S and X; .01 and .02.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T00:04:41Z.
Tested on an RTX 5080 (driver 610.88, Windows 11), built from
829188e9+ this PR. Series S, DLSS Quality, ray tracing off,VICTORY_COMPILE_MEMORY=0. Each run used the same save and the same hands-off sequence (a dock with a house, then a cutscene with parked cars), about 5.5 min long. I captured frames and counted those with random-colour garbage (strongly magenta texels, which these scenes otherwise never have).829188e9as is829188e9without any clearThe "not at the usual place" line never fired in this scene. Two small hardening ideas:
ambientdoes.clear_uav_on_hostreturns false unless the texture is already in UNORDERED_ACCESS. Aonce!log on that path would show if a clear is ever skipped.#3058 (keep the sky miss while the structure builder runs) fits well alongside this, so ray-traced misses still get the sky instead of zero.
I had written the same fix independently (Lyrnc/VIctory-NVIDIA
fix/glass-noise-regression: it binds the image, then clears it). It gave the same result, 0 of 215 on Series S, so I won't open a second PR.AI use: Claude Code (Claude Opus 5.5) built both versions, ran the hands-off A/B runs, counted the frames and wrote this comment.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-30T00:12:32Z.
Thanks @Lyrnc, great measurement (48/208 → 0/223 on Series S). Both suggestions are in now: when the output isn't at (1, 104), the first 2D R11G11B10 unordered image in the tables is cleared (the same variant search
ambientuses), and a clear that can't be recorded logs once instead of failing silently. Agreed that #3058 fits alongside this.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ChenmouXu on 2026-11-30T04:34:07Z.
Confirmed on an RTX 5070 Ti Laptop -- glass is clean here too, and the floors do not brighten
Hardware: RTX 5070 Ti Laptop (Blackwell), driver 32.0.16.2140 (GeForce 610.x branch, 2026-11-21), Ryzen 9 9955HX, Windows 11 26200.
Build:
41adb55with this patch applied on top (git apply, clean), release build, shader cache translated withvictory shaders.Settings: Series S profile, DLSS Quality (0.667), DLSS frame generation 6X,
VICTORY_ASYNC_SUBMIT=1, borderless fullscreen, the 46 baseline variables from the GKinto profile. 9,881 draws/frame in the sample below.Result: glass is clean, every surface that was bad on
829188eis normal.829188ethese were dense purple-green speckle.e1f2eb6, so the white-grain fix is intact.The log confirms the new path rather than the old one:
Nothing else regressed that I can see: ~10 fps render at 9,881 draws (101 ms), 6X presenting 59 fps, no device loss, no pipeline refusals beyond the usual ray-tracing ones. Frame time looks the same as
e1f2eb6within the spread between scenes, so the clear does not appear to cost anything measurable here.Screenshot attached (sunset street, red pickup): windscreen and side glass clean. For reference the "before" frames are on #2661 -- same card, same driver,
829188eunpatched.One data point you may want: this card drops 6X to 2X occasionally (19 times in 797 frames on the previous build), so if you test here expect the presented rate to move around; that is the driver's MFG headroom, not this patch.
![Uploading fixed-glass.png…]()
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-30T05:30:34Z.
Thanks @ChenmouXu! That makes six independent confirmations (RTX 5080 ×2, 5070 Ti desktop + laptop, 3060 on Windows and Linux, RX 7800 XT), now including 6× frame generation and async submit, with no floor brightening and no frame-time cost.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tphira612 on 2026-11-30T07:48:30Z.
Tested in game on an RTX 4090 with a diagnostics build of main (
41adb551) plus this PR. In Jason's house, after about a minute, the stale bright blocks on the glass table and the terrarium glass are gone. The log shows the clear ran (its output cleared to zero instead) and no skipped-clear warning.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-30T08:30:36Z.
Thanks @tphira612 for the before/after captures on the RTX 4090, that's exactly the case (stale blocks on indoor glass) and a clear comparison.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Fr0zenForest on 2026-11-30T10:34:37Z.
Confirmed fixed for me on an RTX 4080 Laptop GPU with
ab342fb7. Onv2026.11.29.01, I saw red and green blocks on the patrol car windows during the cutscene with the two officers. With this build, I no longer see those artifacts. I leftVICTORY_ALIAS_TARGETS=1enabled and didn’t need theVICTORY_RAYMISS_KEEP=1workaround.Setup: Ryzen 9 7945HX, RTX 4080 Laptop GPU (12 GB, driver 610.74), 32 GB RAM. Series S profile, DLSS Quality (1280×720 → 1920×1080), frame generation off.
The log confirms the new path:
reflections' miss program left out: its output cleared to zero instead.Thanks for the fix!
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by milesah3ad on 2026-11-30T11:30:36Z.
Thanks @Fr0zenForest, good to have it on a 4080 Laptop and with
VICTORY_ALIAS_TARGETS=1too.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by POMXARK on 2026-12-01T15:34:06Z.
VERDICT: KEPT IN TREE (default
VICTORY_RAYMISS_ZERO=1) — Applies cleanly,draw::tests14/14 PASS, confirmed active in live 3D (its output cleared to zero instead), clean glass/window visuals and zero FPS regressionTested head
ab342fb7cleanly on top ofv2026.11.30.03(e1251c31).Hardware & Setup
--releasebuild.Verification Results
git apply --3waytocrates/victory-gpu/src/draw.rsandcrates/victory-gpu/src/list.rswith zero conflicts.cargo test -p victory-gpu --lib draw::tests: 14 passed, 0 failed.WARN victory_gpu::draw: reflections' miss program left out: its output cleared to zero instead (VICTORY_RAYMISS_ZERO=0: not)VICTORY_PROCESS_MEMORY=0):VICTORY_KEEP_SHOWN=checked):prep_msmedian42.05 ms,refr_ms13.95 ms,WW_low5.56 ms,WW_high1.52 ms, steady peaks21.7 fps / 46.0 ms(zero extra CPU/GPU overhead vs prior baseline).VICTORY_KEEP_SHOWN=2(eliminating43k+neutral texture swaps to0):frame_msmedian59.60 ms(p75 60.90 ms, min/max46.3–76.2 ms),prep_ms41.45 ms, peaks21.6 fps / 46.3 ms.4/4captured PNG screenshots across diner interior, window glass, and exterior storefronts verified clean — no colored blocks, smearing, or white frost on glass surfaces, and no white grain regression on opaque floors.Full applied PR & patch chain on top of
v2026.11.30.03(e1251c31)#4500(Blackwell upload strides),#4501(prebuild prologue irradiance-cache),#4496(water tiled lightVICTORY_WAVE_FOLDED_FIRST),#4506,#4545(wide non-XOR texture detile cache tiling),#4558,#4567,#4571,#4648(AVX2 landing),#4651(SAME_PRINT),#4659(TELEMETRY_OFF),#4885(VICTORY_THIN_PEEPHOLE, opt-in=0),#2764(VICTORY_RAYMISS_ZERO=1, this PR — KEPT). (Note:#4737was tested and reverted prior to this run.)POMXARK/victory-city-bench,patches/v2026.11.30.03/01..06, reviewed in Discussion #3556):01:COLD_WW_RO1 MiB chunks + out-of-GUARDS64-stripeVP_STRIPE02:VICTORY_STEPS_FAST=1+VICTORY_LISTED_TWINS=003:VICTORY_LOW_L0_DMA=1(0xb10000MEM_WRITE_WATCH 4K + L0→L1 GPU DMA)04:VICTORY_DESC_MIRROR_CAP=1+VICTORY_SOFT_BATCH=1(4 MiBLAZY_AT)05–06: Review hardening (ARMINGbitmap +reopen_striped_block+ real-path race test, droppedahead_intact, strict per-rangecard_l0_dma_allows).--dlss quality,VICTORY_PROCESS_MEMORY=0,VICTORY_PORT_CONSTANTS=0,VICTORY_WC_BAR=3,VICTORY_CARD_CPU_FILE=0,VICTORY_MAP_ONCE=1,VICTORY_SCRATCH_CARD=1,VICTORY_ASK_FIRST=1,VICTORY_SWEEP_OFF_THREAD=0,VICTORY_DUE_INDEX=0,VICTORY_GUARD_SHARDED=1,VICTORY_STEPS_FAST=1,VICTORY_LISTED_TWINS=0,VICTORY_LOW_L0_DMA=1,VICTORY_DESC_MIRROR_CAP=1,VICTORY_SOFT_BATCH=1,VICTORY_THIN_PEEPHOLE=0,VICTORY_RAYMISS_ZERO=1.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RomanFama592 on 2026-12-01T16:03:51Z.
Tested on an RTX 4060 Ti 8 GB (driver 610.88), Ryzen 9 5900X, Windows 11 build 26300, Series S profile at 720 (DLSS quality). Build: this PR at
ab342fb7merged on main7d93ee07(local release build).Automatic, victory-probe-mod (#2825): a plan through glossy floors, glass and water, with steps so the camera moves; 3 runs each.
7d93ee07No cost measured.
Playing for a few minutes in the same places: on main, car paint, chrome grilles, headlights and shop and car windows show blocky noise that flickers on and off. With this PR they look clean; the reflections are plainer, without the noise. #2872 (
VICTORY_RAYMISS_ZERO=1) on the same main still showed the noise.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.