1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

correct equidistant in H3

This commit is contained in:
Zeno Rogue 2020-12-30 20:56:10 +01:00
parent d5fc277531
commit cec8a40786

View File

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