texture_layer shader: check for 0.0 and -0.0 in mod result by @hjanetzek, #139

This commit is contained in:
Emux 2016-08-19 13:27:00 +03:00
parent 7355463090
commit c77e131721

View File

@ -13,7 +13,7 @@ void
main(){
vec4 pos;
vec2 dir = vertex.zw;
if (mod(vertex.x, 2.0) < 1.0) {
if (abs(mod(vertex.x, 2.0)) == 0.0) {
pos = u_proj * (u_mv * vec4(vertex.xy + dir * u_scale, 0.0, 1.0));
}
else { // place as billboard