mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-17 11:30:09 +00:00
in truesim, the shader will not recoordinate H3 to azimuthal equidistant; also fixed distfun
This commit is contained in:
parent
384c5eb2da
commit
e5a7fc9ab9
@ -302,12 +302,16 @@ 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(vrhr::rendering() && hyperbolic) {
|
#if CAP_VR
|
||||||
|
if(vrhr::rendering() && hyperbolic && vrhr::eyes != vrhr::eEyes::truesim) {
|
||||||
coordinator +=
|
coordinator +=
|
||||||
"t = t * acosh(t[3]) / length(t.xyz);\n"
|
"t = t * acosh(t[3]) / length(t.xyz);\n"
|
||||||
"t[3] = 1.;\n";
|
"t[3] = 1.;\n";
|
||||||
|
distfun = "length(t.xyz)";
|
||||||
}
|
}
|
||||||
else if(hyperbolic)
|
else
|
||||||
|
#endif
|
||||||
|
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;
|
||||||
@ -459,6 +463,7 @@ void display_data::set_projection(int ed, ld shift) {
|
|||||||
id <<= 1; if(vid.consider_shader_projection) id |= 1;
|
id <<= 1; if(vid.consider_shader_projection) id |= 1;
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
id <<= 3; id |= vrhr::state;
|
id <<= 3; id |= vrhr::state;
|
||||||
|
if(vrhr::rendering() && vrhr::eyes == vrhr::eEyes::truesim) id += 3;
|
||||||
#endif
|
#endif
|
||||||
id <<= 2; id |= (spherespecial & 3);
|
id <<= 2; id |= (spherespecial & 3);
|
||||||
if(sol && solv_all) id |= 1;
|
if(sol && solv_all) id |= 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user