Uh oh!
There was an error while loading. Please reload this page.
EN-022 engine half: real previous-frame transforms for material draws - #82
EN-022 engine half: real previous-frame transforms for material draws#82proggeramlug wants to merge 1 commit into
Conversation
…erial draws The material ABI carried PerDraw.prev_mvp "for motion vectors" since day one, but every submit path filled it with the CURRENT mvp — world motion vectors were identically zero by construction, so TAA's motion-adaptive clamp never engaged for material-drawn geometry (round-2 audit F8, the primary TSR-shimmer mechanism). - MaterialSystem keeps a per-slot model history (draw slot = submission order, stable frame-to-frame — the same identity convention the cached-model path relies on). submit_draw / submit_draw_instanced now compose prev_vp x prev_model[slot] into PerDraw.prev_mvp; a fresh slot falls back to the current model (zero object motion on its first frame). - reset_draw_slot rotates the history and pins the previous frame's view-projection (from Renderer::prev_vp_matrix, which already fed PerView.prev_view_proj correctly). - The legacy prev_mvp parameter on the submit APIs is ignored and renamed _legacy_prev_mvp (callers passed current-mvp garbage). - material_abi.wgsl gains `abi_motion_vector(curr, prev)` — the core path's exact NDC-delta x 0.5 convention — plus doc guidance for static vs wind-displaced vertex shaders (PerFrame.delta_time already enables prev-time wind evaluation with no ABI change). Behavioral no-op until materials read prev_mvp / write velocity (the shooter's material updates ride a stacked shooter PR). Suite green: 99 lib + 7 golden, all unchanged.
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
proggeramlug
commented
Jul 8, 2026
Landed in main via the round-2 consolidation merge (#83). All commits from this branch are now on main; closing as merged-through-integration. |
Stacked on #75. The ABI's
PerDraw.prev_mvpexisted "for motion vectors" since day one — but every submit path filled it with the current mvp, so world motion vectors were zero by construction and TAA's motion-adaptive clamp never engaged for the material-drawn world (audit F8, the primary TSR-shimmer mechanism).MaterialSystem(slot = submission order, the same stable-identity convention the cached-model path uses);submit_draw/submit_draw_instancedcomposeprev_vp × prev_model[slot]; fresh slots fall back to zero object motion for one frame.reset_draw_slotrotates the history and pinsprev_vp_matrix(which already fedPerView.prev_view_projcorrectly).prev_mvpsubmit parameter is ignored (_legacy_prev_mvp) — callers passed current-mvp garbage.material_abi.wgslgainsabi_motion_vector(curr, prev)matching the core path's NDC-delta × 0.5 convention, with doc guidance for static vs wind-displaced shaders (PerFrame.delta_timealready enables prev-time wind — no ABI layout change anywhere).Behavioral no-op until materials write velocity — the shooter's four world materials do exactly that in the stacked shooter PR. Suite green (99 lib + 7 golden, unchanged — static scenes are velocity-neutral by definition).