correct equidistant in H3

This commit is contained in:
Zeno Rogue 2020-12-30 20:56:10 +01:00
parent d5fc277531
commit cec8a40786
1 changed files with 6 additions and 1 deletions

View File

@ -302,7 +302,12 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
}
else if(pmodel == mdPerspective) {
shader_flags |= SF_PERS3 | SF_DIRECT;
if(hyperbolic)
if(vrhr::rendering() && hyperbolic) {
coordinator +=
"t = t * acosh(t[3]) / length(t.xyz);\n"
"t[3] = 1.;\n";
}
else if(hyperbolic)
distfun = "acosh(t[3])", treset = true;
else if(euclid || nonisotropic || stretch::in() || (sphere && ray::in_use))
distfun = "length(t.xyz)", treset = true;