beta-amd: black smears on vehicles close to the camera come from the TAA disocclusion mask (RDNA 2, RX 6900 XT) #145

Open
opened 2026-11-27 23:48:27 +00:00 by MalarkZA · 3 comments
MalarkZA commented 2026-11-27 23:48:27 +00:00 (Migrated from github.com)
Contributor

Imported from PastiiJay/klbf-lab. Originally posted by MalarkZA on 2026-11-27T23:48:27Z.


What you see

Parked vehicles close to the camera have ragged black smears on and around them: across the body, the windows and the edges (a sedan's roof and side, a pickup's open door, a boat trailer, a dark convertible almost entirely). A few steps back they disappear. It shows on cars, pickups, motorcycles and passing traffic; some nearby vehicles never get it. It doesn't depend on VICTORY_HALF_VIEWS (posted in #86). Standing still or a short pan away and back doesn't clear it; once, it shifted after the game's long idle camera pan.

Machine and build

GPU AMD Radeon RX 6900 XT 16 GB (RDNA 2), driver 32.0.21045.29003
CPU / RAM Ryzen 7 5700X, 64 GB
OS Windows 11 26H2 (build 26300.9711)
Build beta-amd at 4c79ac5 + the aperture-segment fix from #127, --profile diag --features diagnostics, plus two local diagnostic additions (below)
Launch play.ps1 defaults (Series X, memory hooks off, probe rays on, ray tracing off), hand-played

How we traced it

We added a local hotkey: with VICTORY_CAPTURE set, F9 captures the next frames like VICTORY_CAPTURE_FRAMES does (picture, ops listing and, with VICTORY_DUMP_TARGETS=1, every target), so a frame can be captured the moment something shows up in play. We captured a "near" frame (smears visible) and a "far" frame a few steps back (same vehicles, no smears) and compared the targets. Shader names come from shaders.rpf via VICTORY_DUMP_MATCH / victory.exe translate.

The first target that differs between near and far is the mask written by TAA_UtilitiesCS_Disocclusion. Near, it covers the nearby vehicles completely; far, it only has a thin rim around the player. The rest of the TAA chain carries those shapes through to the screen:

Order Shader What it does here
1 TAA_UtilitiesCS_ReconstructSurfaces 11bbed94ee7a3243 Writes a reprojected-depth texture (R32_UINT, image_atomic_umax) from depth and motion vectors. It skips pixels whose motion is under 0.01 or over 0.2, so it only writes moving pixels.
2 TAA_UtilitiesCS_Disocclusion 488b12f581b37bfc Reads depth (R32G8X24: a depth-plane view and a stencil-plane view, format 22, plane 1), last frame's object-class map (R8_UINT, ping-pong), motion vectors and the texture from 1. Writes this frame's class map and an R8_UNORM disocclusion mask. The mask lights up on near vehicles.
3 TAA_UtilitiesCS_SceneColorTemporalResolveDualOutputWithLumaDOFAware b2b1ea29bc3987db Half-res, reads the mask; writes R16G16_FLOAT and R32_UINT targets
4 TAA_UtilitiesCS_ComputeShadingChange e7fbf3641855150d R16G16 → half-res R8 mask (vehicle shapes)
5 TAA_UtilitiesCS_FilterShadingChange 773e5dd5d74eba77 Filters that mask
6 TAA2_PrepareFrameStats e535cfd7baac93b8 Full-res, reads the albedo, both masks and the motion vectors; writes an RGBA8 parameter target, lit exactly where the smears are
7 TAA2_Resolve df11dcd012cd7382 The resolve: the smears are in its output

From the console code (disassembled with the VICTORY_INSPECT tool): Disocclusion takes the nearest depth in each 3×3 neighbourhood and reprojects it with the motion vector. It flags a pixel if last frame's class there shares no bits with this frame's 3×3 classes. Otherwise it flags it when c/(1+d−z_now) − c/(1+d−z_prev), clamped to 0..1, is over a threshold, with z_prev read from the texture in 1. The constants and threshold come from its constant buffers.

Ruled out

  • Depth: the depth buffer is correct in near frames; every vehicle is cleanly present.
  • Motion vectors: correct; parked vehicles show none, only the player moves.
  • Class map: the class map Disocclusion writes is the same in near and far frames and between consecutive frames. Vehicles are classified as vehicles either way.
  • Stencil writes: the stencil writes into this depth target (references, masks, shaders) are the same in near and far frames.
  • The reprojected-depth texture: see the experiment below.

An experiment that didn't fix it

In the lab, the texture from step 1 is about zero on static pixels (it only writes moving ones), and we suspected that zero made Disocclusion see a large depth change on anything near. We tried a local switch: F8 toggles a copy of the depth plane into that texture just before ReconstructSurfaces, through a scratch buffer, so static pixels hold real depth.

  • The fill ran every frame while on (logged, no misses).
  • The texture was full of depth in the capture.
  • The mask and the smears didn't change.

So that texture's zeros aren't the cause.

What we couldn't check

  • The threshold and constants: the capture PNGs are normalised per image, so we couldn't read the threshold or per-pixel values, and couldn't evaluate the formula ourselves.
  • How the R32_UINT texture is read: Disocclusion reads it and does float maths on the result, so the console treats the bits as a float. If the translated shader converted that load by value instead of reinterpreting the bits, the comparison would come out roughly as observed: far depth would pass and near depth would fail. We haven't checked how the translator handles this load, so take this as a question, not a finding.

What we can share

The near/far captures (ops listings and all targets) and the console logs of these runs, on request. The F9 capture hotkey is a small change we can send as a PR if it's useful to others.

<!-- greyfinch-sync:PastiiJay/klbf-lab:issue:6656286894 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/issues/145). Originally posted by [MalarkZA](https://github.com/MalarkZA) on 2026-11-27T23:48:27Z. --- **What you see** Parked vehicles close to the camera have ragged black smears on and around them: across the body, the windows and the edges (a sedan's roof and side, a pickup's open door, a boat trailer, a dark convertible almost entirely). A few steps back they disappear. It shows on cars, pickups, motorcycles and passing traffic; some nearby vehicles never get it. It doesn't depend on `VICTORY_HALF_VIEWS` (posted in #86). Standing still or a short pan away and back doesn't clear it; once, it shifted after the game's long idle camera pan. **Machine and build** | | | |---|---| | GPU | AMD Radeon RX 6900 XT 16 GB (RDNA 2), driver 32.0.21045.29003 | | CPU / RAM | Ryzen 7 5700X, 64 GB | | OS | Windows 11 26H2 (build 26300.9711) | | Build | `beta-amd` at `4c79ac5` + the aperture-segment fix from #127, `--profile diag --features diagnostics`, plus two local diagnostic additions (below) | | Launch | `play.ps1` defaults (Series X, memory hooks off, probe rays on, ray tracing off), hand-played | **How we traced it** We added a local hotkey: with `VICTORY_CAPTURE` set, F9 captures the next frames like `VICTORY_CAPTURE_FRAMES` does (picture, ops listing and, with `VICTORY_DUMP_TARGETS=1`, every target), so a frame can be captured the moment something shows up in play. We captured a "near" frame (smears visible) and a "far" frame a few steps back (same vehicles, no smears) and compared the targets. Shader names come from `shaders.rpf` via `VICTORY_DUMP_MATCH` / `victory.exe translate`. The first target that differs between near and far is the mask written by `TAA_UtilitiesCS_Disocclusion`. Near, it covers the nearby vehicles completely; far, it only has a thin rim around the player. The rest of the TAA chain carries those shapes through to the screen: | Order | Shader | What it does here | |---|---|---| | 1 | `TAA_UtilitiesCS_ReconstructSurfaces` `11bbed94ee7a3243` | Writes a reprojected-depth texture (R32_UINT, `image_atomic_umax`) from depth and motion vectors. It skips pixels whose motion is under 0.01 or over 0.2, so it only writes moving pixels. | | 2 | `TAA_UtilitiesCS_Disocclusion` `488b12f581b37bfc` | Reads depth (R32G8X24: a depth-plane view and a stencil-plane view, format 22, plane 1), last frame's object-class map (R8_UINT, ping-pong), motion vectors and the texture from 1. Writes this frame's class map and an R8_UNORM disocclusion mask. **The mask lights up on near vehicles.** | | 3 | `TAA_UtilitiesCS_SceneColorTemporalResolveDualOutputWithLumaDOFAware` `b2b1ea29bc3987db` | Half-res, reads the mask; writes R16G16_FLOAT and R32_UINT targets | | 4 | `TAA_UtilitiesCS_ComputeShadingChange` `e7fbf3641855150d` | R16G16 → half-res R8 mask (vehicle shapes) | | 5 | `TAA_UtilitiesCS_FilterShadingChange` `773e5dd5d74eba77` | Filters that mask | | 6 | `TAA2_PrepareFrameStats` `e535cfd7baac93b8` | Full-res, reads the albedo, both masks and the motion vectors; writes an RGBA8 parameter target, lit exactly where the smears are | | 7 | `TAA2_Resolve` `df11dcd012cd7382` | The resolve: the smears are in its output | From the console code (disassembled with the `VICTORY_INSPECT` tool): Disocclusion takes the nearest depth in each 3×3 neighbourhood and reprojects it with the motion vector. It flags a pixel if last frame's class there shares no bits with this frame's 3×3 classes. Otherwise it flags it when `c/(1+d−z_now) − c/(1+d−z_prev)`, clamped to 0..1, is over a threshold, with `z_prev` read from the texture in 1. The constants and threshold come from its constant buffers. **Ruled out** - **Depth:** the depth buffer is correct in near frames; every vehicle is cleanly present. - **Motion vectors:** correct; parked vehicles show none, only the player moves. - **Class map:** the class map Disocclusion writes is the same in near and far frames and between consecutive frames. Vehicles are classified as vehicles either way. - **Stencil writes:** the stencil writes into this depth target (references, masks, shaders) are the same in near and far frames. - **The reprojected-depth texture:** see the experiment below. **An experiment that didn't fix it** In the lab, the texture from step 1 is about zero on static pixels (it only writes moving ones), and we suspected that zero made Disocclusion see a large depth change on anything near. We tried a local switch: F8 toggles a copy of the depth plane into that texture just before ReconstructSurfaces, through a scratch buffer, so static pixels hold real depth. - The fill ran every frame while on (logged, no misses). - The texture was full of depth in the capture. - **The mask and the smears didn't change.** So that texture's zeros aren't the cause. **What we couldn't check** - **The threshold and constants:** the capture PNGs are normalised per image, so we couldn't read the threshold or per-pixel values, and couldn't evaluate the formula ourselves. - **How the R32_UINT texture is read:** Disocclusion reads it and does float maths on the result, so the console treats the bits as a float. If the translated shader converted that load by value instead of reinterpreting the bits, the comparison would come out roughly as observed: far depth would pass and near depth would fail. We haven't checked how the translator handles this load, so take this as a question, not a finding. **What we can share** The near/far captures (ops listings and all targets) and the console logs of these runs, on request. The F9 capture hotkey is a small change we can send as a PR if it's useful to others.
PastiiJay commented 2026-11-28 00:03:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-28T00:03:21Z.


Really clear trace, thank you. Comparing the near and far frames target by target is exactly what helps place it in the TAA disocclusion mask. We're looking into it, and you'll be credited for the find.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7230610877 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/issues/145#issuecomment-7230610877). Originally posted by [PastiiJay](https://github.com/PastiiJay) on 2026-11-28T00:03:21Z. --- Really clear trace, thank you. Comparing the near and far frames target by target is exactly what helps place it in the TAA disocclusion mask. We're looking into it, and you'll be credited for the find.
co11ector commented 2026-11-30 07:30:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from PastiiJay/klbf-lab. Originally posted by co11ector on 2026-11-30T07:30:16Z.


Another data point for the TAA disocclusion theory, this time on RDNA 4.

Machine: Radeon RX 9070 XT 16 GB (RDNA 4), Windows 11, 2560x1440.
Build: v26.11.17 (official zip), Profile X, FSR 3.1 Quality (960p -> 1440p), FG x2; VICTORY_ASYNC_SUBMIT=0, VICTORY_QUEUE2=0, VICTORY_INDIRECT_GATHER=0, VICTORY_PIPELINE_WAIT_MS=2000 / VICTORY_PIPELINE_WAIT_CAP_MS=1500, VICTORY_KNOWN_WRITES=0, KLBF_BUFFER_POOL=1.

What I see: same shape as #145. Parked cars close to the camera get ragged black patches across a body panel and along the roof edge (a blue sedan, rear quarter panel plus the roofline). A few steps back and they are gone; passing traffic shows it too. The per-session wrong body colours from the v26.11.17 known-issues list are also present (some cars pick up a green/yellow tint that changes between sessions).

Numbers while it is visible: 45 FPS (FG x2, base 24), 1% low 11, 43 ms, 1.6k draws, VRAM 11.7/16 GB.

Log, repeating while the patches are on screen:
WARN victory_gpu::draw: a texture picked by index changed after its upload with nothing to tell of it: uploaded again first_level=0 blocks_shown_elsewhere=3 slot=35139 address=0x7719580 ...

I did not attach a screenshot because it shows the title. Say the word and I will send it, or capture a near/far frame pair with VICTORY_CAPTURE if that is more useful.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7271806123 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/issues/145#issuecomment-7271806123). Originally posted by [co11ector](https://github.com/co11ector) on 2026-11-30T07:30:16Z. --- Another data point for the TAA disocclusion theory, this time on RDNA 4. **Machine:** Radeon RX 9070 XT 16 GB (RDNA 4), Windows 11, 2560x1440. **Build:** v26.11.17 (official zip), Profile X, FSR 3.1 Quality (960p -> 1440p), FG x2; `VICTORY_ASYNC_SUBMIT=0`, `VICTORY_QUEUE2=0`, `VICTORY_INDIRECT_GATHER=0`, `VICTORY_PIPELINE_WAIT_MS=2000` / `VICTORY_PIPELINE_WAIT_CAP_MS=1500`, `VICTORY_KNOWN_WRITES=0`, `KLBF_BUFFER_POOL=1`. **What I see:** same shape as #145. Parked cars close to the camera get ragged black patches across a body panel and along the roof edge (a blue sedan, rear quarter panel plus the roofline). A few steps back and they are gone; passing traffic shows it too. The per-session wrong body colours from the v26.11.17 known-issues list are also present (some cars pick up a green/yellow tint that changes between sessions). **Numbers while it is visible:** 45 FPS (FG x2, base 24), 1% low 11, 43 ms, 1.6k draws, VRAM 11.7/16 GB. **Log, repeating while the patches are on screen:** `WARN victory_gpu::draw: a texture picked by index changed after its upload with nothing to tell of it: uploaded again first_level=0 blocks_shown_elsewhere=3 slot=35139 address=0x7719580 ...` I did not attach a screenshot because it shows the title. Say the word and I will send it, or capture a near/far frame pair with `VICTORY_CAPTURE` if that is more useful.
PastiiJay commented 2026-11-30 09:57:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-30T09:57:33Z.


Thanks again, really solid data point (and #329 was great too).

One A/B first: you have VICTORY_KNOWN_WRITES=0 set. The line repeating in your log ("a texture picked by index changed after its upload with nothing to tell of it") is exactly what known writes is there to catch in time; without it the texture gets caught up late. Could you redo the same spot removing only VICTORY_KNOWN_WRITES=0, and tell us if the black patches stay?

And yes please for the near/far pair, good call not posting it here. Add VICTORY_CAPTURE=C:\klbf-capture VICTORY_DUMP_TARGETS=1 VICTORY_CAPTURE_FRAMES=<near frame>,<far frame> (frame numbers from the title bar or F8), so we get the render targets and not only the final image. Send the folder and the screenshots through WeTransfer to [email protected], with the Report a bug zip.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7274917090 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/issues/145#issuecomment-7274917090). Originally posted by [PastiiJay](https://github.com/PastiiJay) on 2026-11-30T09:57:33Z. --- Thanks again, really solid data point (and #329 was great too). One A/B first: you have `VICTORY_KNOWN_WRITES=0` set. The line repeating in your log ("a texture picked by index changed after its upload with nothing to tell of it") is exactly what known writes is there to catch in time; without it the texture gets caught up late. Could you redo the same spot removing only `VICTORY_KNOWN_WRITES=0`, and tell us if the black patches stay? And yes please for the near/far pair, good call not posting it here. Add `VICTORY_CAPTURE=C:\klbf-capture VICTORY_DUMP_TARGETS=1 VICTORY_CAPTURE_FRAMES=<near frame>,<far frame>` (frame numbers from the title bar or F8), so we get the render targets and not only the final image. Send the folder and the screenshots through WeTransfer to [email protected], with the Report a bug zip.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
PastiiJay/klbf-lab#145
No description provided.