Files
horizon-airdef/crates
chexit 8e711f9692 Decode the motion buffer per history grid in TAA/TAAU (#143)
The G-buffer's motion buffer is current-to-previous in jittered render
pixels: both positions are projected with their frame's drawn matrix, so
even a still surface writes the two frames' jitter difference. fs_taa
(1:1) keeps its history on the jittered grid and needs that difference as
written, but native TAAU resolves a full-size history on the stable output
grid, so using the buffer raw shifted every still pixel's history lookup
by the jitter difference — (+0.375, +0.5) output pixels at 1280x720 ->
1920x1080 on the first Halton(2,3) pair.

State the contract explicitly (gfx/hd/mod.rs, taa.rs, frame.rs and the
motion producers in terrain.wgsl / entity.wgsl) and pass the previous
frame's jitter to the shaders (HdFrame.prev_jitter, HdScene::prev_jitter_px,
Renderer::taa_prev). fs_taau now adds the current jitter and subtracts the
previous one, so a still surface reads the same output pixel on every
phase; fs_taa is unchanged. The DLSS backend receives the buffer and its
flags unchanged — NGX's input contract is verified on that path separately
(#137), not inferred here.

Numerical tests cover every jitter phase at 1:1 and fractional scales:
the still-surface lookup, the 1:1 correction, a moving camera (the motion
path and the depth/camera fallback agree on one continuous surface), a
moving model's known shift, the issue's worked numbers, and the
jittered-depth unprojection. An ignored GPU smoke runs the real fs_taau
A/B on a still finely patterned surface at 1280x720 -> 1920x1080: the old
decode against the fixed one, the depth fallback (must agree with the
fixed decode), and the spatial filter alone (the production lanczos
gather's own sub-pixel error is the floor the temporal path must not add
to).

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
2026-11-21 10:03:06 +03:00
..