Motion Vectors Setup
Last updated
Last updated
Motion Vectors necessary for the some rendering effects like TAA. Unfortunately Unity Supports custom motion vectors after version 6 and after. Even then a small change in shaders reqired to have motion vectors.
Motion Vectors basically difference between current and previous frame position of the vertices. Ica Skinner store previous frame positions on uv3 xyz part. There is included subgraph to generate motion vectors, all you need to do is import it in the your shader graph and connect to motion vectors input: Step 1: Open Your Shader Graph and enable "Add Custom Velocity" option on graph settings. It will activate a new input on vertex block.
Step 2: Import the "Fetch Motion Vectors" subgraph that comes with the asset.
Step 3: Conect it to Motion Vectors Input. Ans save the shader.
Step 4: Go inspector to material that use that shader, and enable the "Motion Vectors for Vertex Animation" option.