1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-28 02:50:34 +00:00

ray:: fixed distance in Sol

This commit is contained in:
Zeno Rogue 2019-10-26 14:19:53 +02:00
parent 6d38362bbc
commit 9cc4f627cf

View File

@ -147,7 +147,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
coordinator +=
"float d = sqrt(t[0] * t[0] + t[1] * t[1] + t[2] * t[2]);\n"
"float ad = (d == 0.) ? 0. : (d < 1.) ? min(atanh(d), 10.) : 10.;\n"
"float m = ad / d / 11.; t[0] *= m; t[1] *= m; t[2] *= m;\n";
"float m = ad / d; t[0] *= m; t[1] *= m; t[2] *= m;\n";
distfun = "ad";
}
else