 
     #include "UnityCG.cginc"
 
+    #define TAA_USE_GATHER4_FOR_DEPTH_SAMPLE (SHADER_TARGET >= 41)
+
     #define TAA_REMOVE_COLOR_SAMPLE_JITTER 1
 
     #define TAA_USE_EXPERIMENTAL_OPTIMIZATIONS 1


    float2 getClosestFragment(in float2 uv)
    {
        const float2 k = TAA_DEPTH_SAMPLE_SPREAD * _CameraDepthTexture_TexelSize.xy;

        const float4 neighborhood = float4(
            tex2D(_CameraDepthTexture, uv - k).r,
            tex2D(_CameraDepthTexture, uv + float2(k.x, -k.y)).r,
            tex2D(_CameraDepthTexture, uv + float2(-k.x, k.y)).r,
            tex2D(_CameraDepthTexture, uv + k).r);

        float3 result = float3(0., 0., tex2D(_CameraDepthTexture, uv).r);

        #if TAA_USE_EXPERIMENTAL_OPTIMIZATIONS
            result = lerp(result, float3(-1., -1., neighborhood.x), step(neighborhood.x, result.z));

    #define TAA_DILATE_MOTION_VECTOR_SAMPLE 1

    #define TAA_CLIP_HISTORY_SAMPLE 1

    #define TAA_SHARPEN_OUTPUT 1
    #define TAA_FINAL_BLEND_METHOD 2
