mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-30 15:39:54 +00:00
ray:: fixed distance in Sol
This commit is contained in:
parent
6d38362bbc
commit
9cc4f627cf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user