mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-30 03:50:34 +00:00
two-sided display of hyperbolic disk with -1<pconf.alpha<0
This commit is contained in:
parent
eb58d78555
commit
e8e6d0aa25
@ -306,7 +306,7 @@ EX bool two_sided_model() {
|
|||||||
if(in_vr_sphere) return true;
|
if(in_vr_sphere) return true;
|
||||||
if(pmodel == mdHyperboloid) return !euclid && !in_vr;
|
if(pmodel == mdHyperboloid) return !euclid && !in_vr;
|
||||||
// if(pmodel == mdHemisphere) return true;
|
// if(pmodel == mdHemisphere) return true;
|
||||||
if(pmodel == mdDisk) return sphere;
|
if(pmodel == mdDisk) return sphere || (hyperbolic && pconf.alpha < 0 && pconf.alpha > -1);
|
||||||
if(pmodel == mdRetroLittrow) return sphere;
|
if(pmodel == mdRetroLittrow) return sphere;
|
||||||
if(pmodel == mdRetroHammer) return sphere;
|
if(pmodel == mdRetroHammer) return sphere;
|
||||||
if(pmodel == mdHemisphere) return !in_vr;
|
if(pmodel == mdHemisphere) return !in_vr;
|
||||||
@ -333,6 +333,9 @@ EX int get_side(const hyperpoint& H) {
|
|||||||
double horizon = curnorm / pconf.alpha;
|
double horizon = curnorm / pconf.alpha;
|
||||||
return (H[2] <= -horizon) ? -1 : 1;
|
return (H[2] <= -horizon) ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
if(pmodel == mdDisk && hyperbolic && pconf.alpha < 0 && pconf.alpha > -1) {
|
||||||
|
return (H[2] * (H[2] + pconf.alpha) < sqhypot_d(2, H)) ? -1 : 1;
|
||||||
|
}
|
||||||
if(pmodel == mdRetroLittrow && sphere) {
|
if(pmodel == mdRetroLittrow && sphere) {
|
||||||
return H[2] >= 0 ? 1 : -1;
|
return H[2] >= 0 ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
|
|||||||
else if(!vid.consider_shader_projection) {
|
else if(!vid.consider_shader_projection) {
|
||||||
shader_flags |= SF_PIXELS;
|
shader_flags |= SF_PIXELS;
|
||||||
}
|
}
|
||||||
else if(among(pmodel, mdDisk, mdBall) && GDIM == 2 && vrhr::rendering() && !sphere) {
|
else if(among(pmodel, mdDisk, mdBall) && GDIM == 2 && vrhr::rendering() && !sphere && !(hyperbolic && pconf.alpha < 0 && pconf.alpha > -1)) {
|
||||||
shader_flags |= SF_DIRECT | SF_BOX;
|
shader_flags |= SF_DIRECT | SF_BOX;
|
||||||
vsh += "uniform mediump float uAlpha, uDepth, uDepthScaling, uCamera;";
|
vsh += "uniform mediump float uAlpha, uDepth, uDepthScaling, uCamera;";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user