EN-022 engine half: real previous-frame transforms for material draws#82
Closed
proggeramlug wants to merge 1 commit into
Closed
EN-022 engine half: real previous-frame transforms for material draws#82proggeramlug wants to merge 1 commit into
proggeramlug 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 |
This was referenced Jul 4, 2026
Contributor
Author
|
Landed in main via the round-2 consolidation merge (#83). All commits from this branch are now on main; closing as merged-through-integration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).