texture_layer shader: avoid == in floating point number comparison, fixes #139

This commit is contained in:
Emux 2016-08-19 11:17:59 +03:00
parent 52b362be8b
commit 3a1ee523bc

View File

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