shader/rectangle_frag.glsl

changeset 157
d6c2f028d8c9
parent 151
42960d0c879b
child 158
f650994ec543
equal deleted inserted replaced
156:bd15eeaa88c0 157:d6c2f028d8c9
9 9
10 void main(void) { 10 void main(void) {
11 #ifdef FILL 11 #ifdef FILL
12 diffuse = color; 12 diffuse = color;
13 #else 13 #else
14 if (uvcoord.x < thickness || uvcoord.x >= size.x - thickness || uvcoord.y < thickness || uvcoord.y >= size.y-thickness) { 14 if (any(notEqual(1.0-step(thickness, uvcoord)+step(size-thickness, uvcoord), vec2(0.0)))) {
15 diffuse = color; 15 diffuse = color;
16 } else { 16 } else {
17 discard; 17 discard;
18 } 18 }
19 #endif 19 #endif

mercurial