nicer slshader

This commit is contained in:
Zeno Rogue 2020-07-24 11:35:32 +02:00
parent 351eda2b5d
commit 4c6500514e
1 changed files with 2 additions and 2 deletions

View File

@ -1916,9 +1916,9 @@ EX namespace slr {
"bool flipped = phi > 0.;"
"float alpha = atan2(h[1], -h[0]) + uIndexSL;"
"if(flipped) phi = -phi;"
"if(flipped) phi = -phi, alpha = atan2(h[1], h[0]) - uIndexSL;"
"float alpha = flipped ? atan2(h[1], h[0]) - uIndexSL : atan2(h[1], -h[0]) + uIndexSL;"
"float fiber_barrier = atan(1./uSV);"