I found something useful here How to correctly render the motion velocity buffer with SRP?
Although the link in this post is broken. But I finally work out that, you need to disable the motion vector pass with material.SetShaderPassEnabled
for all the materials of motion vector objects. And the proper way is to override the defaultMaterial property in your RenderPipelineAsset, and write a custom editor for your shader, so that you can disable the velocity pass for all materials being created.
The associated code in HDRP can be found here → Graphics/com.unity.render-pipelines.high-definition/Editor/Material/PBR/HDPBRLit.cs at 56eb1c3bf66ec9b939716e7199284909f6208a93 · Unity-Technologies/Graphics · GitHub
1 Like