1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

ray:: fixed dark lines in H2xR which happened when we got a=0 in quadratic equation

This commit is contained in:
Zeno Rogue 2022-02-26 09:50:45 +01:00
parent 80b9d9533c
commit 015006546e

View File

@ -451,6 +451,7 @@ void raygen::compute_which_and_dist(int flat1, int flat2) {
"mediump float zsgn = (Mt > 0. ? -sgn : sgn);\n"
"mediump float u = sqrt(b*b-c)*zsgn + b;\n"
"mediump float v = -(Mp*u-1.) / Mt;\n"
"if(a < 1e-5) v = (1.-Mp*Mp) / (2. * Mt);\n"
"mediump float d = asinh(v);\n";
if(prod) fmain += "d /= xspeed;\n";
fmain +=