Check for __APPLE__ instead of __DARWIN__.
[movit] / blur_effect.frag
1 // A simple un.directional blur.
2 // DIRECTION_VERTICAL will be #defined to 1 if we are doing a vertical blur,
3 // 0 otherwise.
4
5 uniform vec2 PREFIX(samples)[NUM_TAPS / 2 + 1];
6
7 vec4 FUNCNAME(vec2 tc) {
8         vec4 sum = vec4(PREFIX(samples)[0].y) * INPUT(tc);
9         for (int i = 1; i < NUM_TAPS / 2 + 1; ++i) {
10                 vec2 sample = PREFIX(samples)[i];
11                 vec2 sample1_tc = tc, sample2_tc = tc;
12 #if DIRECTION_VERTICAL
13                 sample1_tc.y -= sample.x;
14                 sample2_tc.y += sample.x;
15 #else
16                 sample1_tc.x -= sample.x;
17                 sample2_tc.x += sample.x;
18 #endif
19                 sum += vec4(sample.y) * (INPUT(sample1_tc) + INPUT(sample2_tc));
20         }
21         return sum;
22 }
23
24 #undef DIRECTION_VERTICAL