motionVectorMode
Motion vector mode.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public MotionVectorGenerationMode motionVectorMode { readonly get; set; }
Remarks
Unity configures the built-in shader uniform to calculate motion vectors in HLSL code.
unity_MotionVectorsParamsFor ray tracing instances, is a vector uniform. Its component values are as follows:
unity_MotionVectorsParams- the x and z components are 0.
- the y component is 0 if the motion vector mode is MotionVectorGenerationMode.ForceNoMotion. Otherwise it is 1.
- the w component is 0 if the motion vector mode is MotionVectorGenerationMode.Camera. Otherwise it is 1.
To access the ray tracing instance matrix in closest hit, any hit, and intersection shaders, use the or HLSL functions.
ObjectToWorldWorldToObjectAdditional Resources: MotionVectorGenerationMode.