 
         float4 minimum = min(min(min(min(neighborhood[0], neighborhood[1]), neighborhood[2]), neighborhood[3]), color);
         float4 maximum = max(max(max(max(neighborhood[0], neighborhood[1]), neighborhood[2]), neighborhood[3]), color);
-    #else
+    #elif TAA_COLOR_NEIGHBORHOOD_SAMPLE_PATTERN == 1
         // 0 1 2
         // 3
         float4x4 top = float4x4(


        float4 minimum = min(min(min(min(min(min(min(min(top[0], top[1]), top[2]), top[3]), bottom[0]), bottom[1]), bottom[2]), bottom[3]), color);
        float4 maximum = max(max(max(max(max(max(max(max(top[0], top[1]), top[2]), top[3]), bottom[0]), bottom[1]), bottom[2]), bottom[3]), color);
    #endif

        k = TAA_HISTORY_NEIGHBORHOOD_SAMPLE_SPREAD * _HistoryTex_TexelSize.xy;

    #else
        history = clamp(history, minimum, maximum);
    #endif

    #if TAA_FINAL_BLEND_METHOD == 0
        // Constant blend factor, works most of the time & cheap; but isn't as nice as a derivative of Sousa 13
        color = lerp(color, history, TAA_FINAL_BLEND_FACTOR);
    #elif TAA_FINAL_BLEND_METHOD == 1
        // Implements the final blend method from Playdead's TAA implementation
        #if TAA_COLOR_NEIGHBORHOOD_SAMPLE_PATTERN < 2
            float2
        #endif

        luma = float2(Luminance(color.rgb), Luminance(history.rgb));

        float weight = 1. - abs(luma.x - luma.y) / max(luma.x, max(luma.y, .2));
        color = lerp(color, history, lerp(.88, .97, weight * weight));
    #elif TAA_FINAL_BLEND_METHOD == 2
