]> git.sesse.net Git - movit/blob - complex_modulate_effect.frag
Factor out RTT sampler setting in its own function.
[movit] / complex_modulate_effect.frag
1 uniform vec2 PREFIX(num_repeats);
2
3 vec4 FUNCNAME(vec2 tc) {
4         vec4 pixel = INPUT1(tc);
5         vec2 pattern = INPUT2(tc * PREFIX(num_repeats)).xy;
6
7         // Complex multiplication between each of (pixel.xy, pixel.zw) and pattern.xy.
8         return pattern.x * pixel + pattern.y * vec4(-pixel.y, pixel.x, -pixel.w, pixel.z);
9 }