EN-022 shooter half: real motion vectors for all four world materials#4
Closed
proggeramlug wants to merge 1 commit into
Closed
EN-022 shooter half: real motion vectors for all four world materials#4proggeramlug wants to merge 1 commit into
proggeramlug wants to merge 1 commit into
Conversation
Round-2 audit F8: every world material wrote velocity = (0,0), so TAA's motion-adaptive clamp never engaged for terrain / building / trees / grass — the primary mechanism behind TSR-0.5 shimmer on thin grass and sway ghosting. With the engine half (Bloom-Engine/engine PR #82: per-slot prev transforms + abi_motion_vector), the four world materials now output real motion vectors: - terrain.wgsl / building.wgsl: static geometry — previous clip = view.prev_view_proj x world (pure camera reprojection). - tree.wgsl: wind sway re-evaluated at frame.time - frame.delta_time, projected by the previous VP — sway finally moves the velocity buffer instead of ghosting through TAA at velocity 0. - grass_instanced.wgsl + the inline copy in main.ts (kept in sync, as the SH-005 note requires): per-blade sway one frame back. All velocity writes go through the ABI's abi_motion_vector (the core path's exact NDC-delta x 0.5 convention). Requires the engine lib from PR #82 (older libs compile these shaders fine — prev_view_proj and prev_mvp always existed in the ABI — but prev_mvp was filled with the current mvp there, so object motion would read zero; camera reprojection works either way). Smoked at 4K on the live game: all four materials compile and render clean with wind sway active — no smearing or warp, which a wrong velocity sign/scale would show immediately under TAA.
|
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 |
Contributor
Author
|
Landed in main via the round-2 consolidation merge (#5). 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 #2 (quick wins). Pairs with engine PR Bloom-Engine/engine#82 (the engine half: real per-slot previous transforms + the
abi_motion_vectorhelper).What changes
Audit F8: the whole material-drawn world wrote
velocity = (0,0), so TAA's motion-adaptive clamp never engaged — the primary mechanism behind TSR-0.5 thin-grass shimmer and wind-sway ghosting.view.prev_view_proj × world— pure camera reprojection.frame.time − frame.delta_timeand projected by the previous VP — swaying canopies finally write real motion.abi_motion_vector(core-path NDC-delta × 0.5 convention).Compatibility
Older engine libs compile these shaders unchanged (
prev_view_proj/prev_mvpalways existed in the ABI) — object motion just reads zero there. With engine #82 the object half becomes real too.Validation
Smoked at 4K with wind active: clean render, no smear/warp (a wrong velocity sign is immediately visible under TAA as tearing on swaying geometry). Quantified shimmer comparison (frame-diff metric at the audit's S7 strafe pose, before/after) is the follow-up measurement once both PRs merge into one build.