Dear all I am new to Unity development. I have a question regarding the _CameraMotionVectorsTexture outputs. For example, partial of my shader fragment code to sample and convert the motion vector texture: Code (CSharp): float2 motion = tex2D(_CameraMotionVectorsTexture, i.uv).rg; motion = motion * _CameraMotionVectorsTexture_TexelSize.zw From Unity documentation, e.g. https://docs.unity3d.com/ScriptReference/DepthTextureMode.MotionVectors.html, the output should be the object movement on the projected image in pixel domain from frame t to frame t+1. However, the result does not seem right after I manually check the pixel movements (see below) For example, I have a ball moving from right to left, and the ball's x coordinates change from 1088 to 1047, and the difference is 41 pixels. However, on my motion vector map, I have a result of 101.6 pixels instead. there is a huge differences. projected image frame t: projected image frame t+1: motionvector map at frame t+1: I am wondering if my conversion is right? Or am I missing something here? If needed, I can post all the codes here. Thank you everyone!
I resolved the issue. During set up, both depth and motionvectors for camera depth needs to be enabled. Thank you!