fixed slshader when xy==0

This commit is contained in:
Zeno Rogue 2020-07-25 03:14:11 +02:00
parent 4d9775080d
commit adc17dce1b
1 changed files with 2 additions and 0 deletions

View File

@ -1942,6 +1942,8 @@ EX namespace slr {
"float xy = length(h.xy);"
"float phi = atan2(h[2], h[3]) + uIndexSL;"
"if(xy < 1e-6) return vec4(0.,0.,phi,1.);"
"vec4 res = vec4(sqrt(-1.),sqrt(-1.),sqrt(-1.),sqrt(-1.));"
"bool flipped = phi > 0.;"