From e5a7fc9ab9502dfd49a3894560660add94338b51 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 31 Dec 2020 02:58:30 +0100 Subject: [PATCH] in truesim, the shader will not recoordinate H3 to azimuthal equidistant; also fixed distfun --- shaders.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shaders.cpp b/shaders.cpp index 50a1024c..d41f60da 100644 --- a/shaders.cpp +++ b/shaders.cpp @@ -302,12 +302,16 @@ shared_ptr write_shader(flagtype shader_flags) { } else if(pmodel == mdPerspective) { shader_flags |= SF_PERS3 | SF_DIRECT; - if(vrhr::rendering() && hyperbolic) { + #if CAP_VR + if(vrhr::rendering() && hyperbolic && vrhr::eyes != vrhr::eEyes::truesim) { coordinator += "t = t * acosh(t[3]) / length(t.xyz);\n" "t[3] = 1.;\n"; + distfun = "length(t.xyz)"; } - else if(hyperbolic) + else + #endif + if(hyperbolic) distfun = "acosh(t[3])", treset = true; else if(euclid || nonisotropic || stretch::in() || (sphere && ray::in_use)) distfun = "length(t.xyz)", treset = true; @@ -459,6 +463,7 @@ void display_data::set_projection(int ed, ld shift) { id <<= 1; if(vid.consider_shader_projection) id |= 1; #if CAP_VR id <<= 3; id |= vrhr::state; + if(vrhr::rendering() && vrhr::eyes == vrhr::eEyes::truesim) id += 3; #endif id <<= 2; id |= (spherespecial & 3); if(sol && solv_all) id |= 1;