Skip to content

feat(render): per-object motion vectors for motion blur - #527

Merged
Codeboy-cn merged 1 commit into
Orillusion:devfrom
Codeboy-cn:chain/17-object-motion-vectors
Nov 6, 2026
Merged

Codeboy-cn merged 1 commit into
Orillusion:devfrom
Codeboy-cn:chain/17-object-motion-vectors

Conversation

@Codeboy-cn

Copy link
Copy Markdown
Collaborator

New render setting objectMotionVectors. MatrixBindGroup keeps a GPU copy of the previous frame's model matrices; every opaque material gets a VELOCITY sub-pass (VelocityPass_shader / VelocityMaterialPass) that MotionVectorPass rasterises over its camera-only compute fill, writing (uv - prevUv) into _MotionVector. MotionBlurPost samples that texture (USE_VELOCITY_TEX) so moving objects streak with a static camera. Skinned / morphed meshes carry their rigid motion only.

New render setting objectMotionVectors. MatrixBindGroup keeps a GPU copy of
the previous frame's model matrices; every opaque material gets a VELOCITY
sub-pass (VelocityPass_shader / VelocityMaterialPass) that MotionVectorPass
rasterises over its camera-only compute fill, writing (uv - prevUv) into
_MotionVector. MotionBlurPost samples that texture (USE_VELOCITY_TEX) so
moving objects streak with a static camera. Skinned / morphed meshes carry
their rigid motion only.

Also: MotionVectorPass now depends on _ColorBuffer (it used to run before
ColorPass and reproject last frame's depth), PostPass reads _MotionVector.
Demo Sample_ObjectMotionBlur, 4-case test with CPU-predicted velocities.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Codeboy-cn
Codeboy-cn merged commit 2f44234 into Orillusion:dev Nov 6, 2026
1 check passed
@lslzl3000 lslzl3000 mentioned this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants