]> git.sesse.net Git - movit/blob - padding_effect.frag
Factor out RTT sampler setting in its own function.
[movit] / padding_effect.frag
1 uniform vec2 PREFIX(offset);
2 uniform vec2 PREFIX(scale);
3 uniform vec2 PREFIX(texcoord_min);
4 uniform vec2 PREFIX(texcoord_max);
5
6 vec4 FUNCNAME(vec2 tc) {
7         tc -= PREFIX(offset);
8         tc *= PREFIX(scale);
9
10         if (any(lessThan(tc, PREFIX(texcoord_min))) ||
11             any(greaterThan(tc, PREFIX(texcoord_max)))) {
12                 return PREFIX(border_color);
13         }
14
15         return INPUT(tc);
16 }