1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

fixed S2xE and H2xE

This commit is contained in:
Zeno Rogue 2019-10-28 17:34:16 +01:00
parent 2002845f8a
commit d375328096

View File

@ -180,7 +180,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
break;
}
}
else if(geometry == gProduct) {
else if(geometry == gProduct && !hybrid::over_sphere()) {
shader_flags |= SF_PERS3 | SF_DIRECT;
coordinator +=
"float z = log(t[2] * t[2] - t[0] * t[0] - t[1] * t[1]) / 2.;\n"
@ -190,6 +190,11 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
"if(r != 0.) r = d / r;\n"
"t.xy *= r; t.z = z;\n";
distfun = "sqrt(z*z+d*d)";
treset = true;
}
else if(geometry == gProduct && hybrid::over_sphere()) {
shader_flags |= SF_PERS3 | SF_DIRECT;
distfun = "length(t.xyz)", treset = true;
}
else if(pmodel == mdPerspective) {
shader_flags |= SF_PERS3 | SF_DIRECT;