SkillAgentSearch skills...

DrawMeshWithMotionVectors

An example showing how to generate per-object motion vectors when using DrawMesh.

Install / Use

/learn @keijiro/DrawMeshWithMotionVectors
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

DrawMeshWithMotionVectors

This is an example showing how to generate per-object motion vectors correctly when using Graphics.DrawMesh to draw objects.

gif

The sphere in the gif above is drawn with using Graphics.DrawMesh. The previous versions of Unity can't generate per-object motion vectors on this sphere, so that only camera motion is applied in motion effects (motion blur, temporal anti-aliasing, etc.).

Unity 5.6 introduced BuiltinRenderTextureType.MotionVectors that provides access to the internal motion vectors buffer. One can overwrite the buffer with using command buffers to generate per-object motion vectors on objects drawn with DrawMesh and its variants.

Related Skills

View on GitHub
GitHub Stars79
CategoryDevelopment
Updated3mo ago
Forks8

Languages

C#

Security Score

82/100

Audited on Dec 9, 2025

No findings