Unity Web Shader IDE
Full source <URP>/Shaders/ObjectMotionVectorFallback.shader ShaderLab / HLSL 40 lines 5 symbols 2 includes Hide source Show source
ObjectMotionVectorFallback.shader <URP>/Shaders/ObjectMotionVectorFallback.shader
Language
ShaderLab / HLSL
Lines
40
Symbols
5
Includes
2
Open IDE root

<URP>/Shaders/ObjectMotionVectorFallback.shader full source

Shader "Hidden/Universal Render Pipeline/ObjectMotionVectorFallback"
{
    SubShader
    {
        Pass
        {
            Name "MotionVectors"

            Tags{ "LightMode" = "MotionVectors" }
            ColorMask RG

            HLSLPROGRAM
            #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ObjectMotionVectors.hlsl"
            ENDHLSL
        }

        Pass
        {
            Name "XRMotionVectors"
            Tags { "LightMode" = "XRMotionVectors" }
            ColorMask RGB

            // Stencil write for obj motion pixels
            Stencil
            {
                WriteMask 1
                Ref 1
                Comp Always
                Pass Replace
            }

            HLSLPROGRAM
            #define APPLICATION_SPACE_WARP_MOTION 1
            #define APPLICATION_SPACE_WARP_MOTION_TRANSPARENT 0
            #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ObjectMotionVectors.hlsl"
            ENDHLSL
        }
    }
}