Factorize the code to compute sampling points for bilinear sampling into a shared...
[movit] / blur_effect.frag
index 7e5a424..c6e4cf5 100644 (file)
@@ -5,10 +5,10 @@
 uniform vec4 PREFIX(samples)[NUM_TAPS + 1];
 
 vec4 FUNCNAME(vec2 tc) {
-       vec4 sum = vec4(PREFIX(samples)[0].z) * LAST_INPUT(tc);
+       vec4 sum = vec4(PREFIX(samples)[0].z) * INPUT(tc);
        for (int i = 1; i < NUM_TAPS + 1; ++i) {
                vec4 sample = PREFIX(samples)[i];
-               sum += vec4(sample.z) * (LAST_INPUT(tc - sample.xy) + LAST_INPUT(tc + sample.xy));
+               sum += vec4(sample.z) * (INPUT(tc - sample.xy) + INPUT(tc + sample.xy));
        }
        return sum;
 }