1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

nicer slshader

This commit is contained in:
Zeno Rogue 2020-07-24 11:35:32 +02:00
parent 351eda2b5d
commit 4c6500514e

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);"