]> git.sesse.net Git - movit/blob - complex_modulate_effect.frag
Properly ignore the sign bit when comparing NaNs.
[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 }