1 uniform vec2 PREFIX(offset);
2 uniform vec2 PREFIX(scale);
3 uniform vec2 PREFIX(texcoord_min);
4 uniform vec2 PREFIX(texcoord_max);
6 vec4 FUNCNAME(vec2 tc) {
11 if (any(lessThan(tc, PREFIX(texcoord_min))) ||
12 any(greaterThan(tc, PREFIX(texcoord_max)))) {
13 return PREFIX(border_color);
16 if (any(lessThan(tc, vec2(0.0))) ||
17 any(greaterThan(tc, vec2(1.0)))) {
18 return PREFIX(border_color);
21 // In theory, maybe we should test on the outmost textel centers
22 // (e.g. (0.5/width, 0.5/height) for the top-left) instead of the
23 // texture border. However, since we only support integer padding
24 if (any(lessThan(tc, vec2(0.0))) || any(greaterThan(tc, vec2(1.0)))) {
25 return PREFIX(border_color);