     Output fragment(Varyings input)
     {
     #if TAA_DILATE_MOTION_VECTOR_SAMPLE
-        float2 motion = tex2D(_CameraMotionVectorsTexture, getClosestFragment(input.defaultUV)).xy;
+        float2 motion = tex2D(_CameraMotionVectorsTexture, getClosestFragment(input.uv.zw)).xy;
     #else
-        float2 motion = tex2D(_CameraMotionVectorsTexture, input.defaultUV).xy;
+        float2 motion = tex2D(_CameraMotionVectorsTexture, input.uv.zw).xy;
     #endif
 
         float2 k = TAA_COLOR_NEIGHBORHOOD_SAMPLE_SPREAD * _MainTex_TexelSize.xy;
-        float2 mainUV = input.mainTexUV;
+        float2 uv = input.uv.xy;
     #if TAA_REMOVE_COLOR_SAMPLE_JITTER && UNITY_UV_STARTS_AT_TOP
-        mainUV -= _MainTex_TexelSize.y < 0 ? _Jitter * float2(1, -1) : _Jitter;
+        uv -= _MainTex_TexelSize.y < 0 ? _Jitter * float2(1, -1) : _Jitter;
     #elif TAA_REMOVE_COLOR_SAMPLE_JITTER
-        mainUV -= _Jitter;
-    #endif
-
-        float4 color = tex2D(_MainTex, mainUV);
+        uv -= _Jitter;
+    #endif
+
+        float4 color = tex2D(_MainTex, uv);
 
     #if TAA_COLOR_NEIGHBORHOOD_SAMPLE_PATTERN == 0
         // Karis 13: a box filter is not stable under motion, use raw color instead of an averaged one
         float4x4 neighborhood = float4x4(
-            tex2D(_MainTex, mainUV + float2(0., -k.y)),
-            tex2D(_MainTex, mainUV + float2(-k.x, 0.)),
-            tex2D(_MainTex, mainUV + float2(k.x, 0.)),
-            tex2D(_MainTex, mainUV + float2(0., k.y)));
+            tex2D(_MainTex, uv + float2(0., -k.y)),
+            tex2D(_MainTex, uv + float2(-k.x, 0.)),
+            tex2D(_MainTex, uv + float2(k.x, 0.)),
+            tex2D(_MainTex, uv + float2(0., k.y)));
 
         #if TAA_SHARPEN_OUTPUT
             float4 edges = (neighborhood[0] + neighborhood[1] + neighborhood[2] + neighborhood[3]) * .25;

    struct Varyings
    {
        float4 vertex : SV_POSITION;

        float2 mainTexUV : TEXCOORD0;
        float2 defaultUV  : TEXCOORD1;
    };

    struct Output

    #endif

        k = TAA_HISTORY_NEIGHBORHOOD_SAMPLE_SPREAD * _HistoryTex_TexelSize.xy;

        float4 history = tex2D(_HistoryTex, input.uv.zw - motion);

    #if TAA_TONEMAP_COLOR_AND_HISTORY_SAMPLES
        history = map(history);
