1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-16 13:48:04 +00:00

nilv:: Nil shader, and improved geodesics

This commit is contained in:
Zeno Rogue
2019-08-06 20:55:41 +02:00
parent 9350053c49
commit 8ac64fc2a0
7 changed files with 68 additions and 35 deletions

View File

@@ -5057,16 +5057,26 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
}
noclipped++;
}
if(pmodel == mdGeodesic) {
if(pmodel == mdGeodesic && sol) {
using namespace hyperpoint_vec;
hyperpoint H = tC0(V);
if(abs(H[0]) <= 2 && abs(H[1]) <= 2 && abs(H[2]) <= 2) ;
if(abs(H[0]) <= 3 && abs(H[1]) <= 3 && abs(H[2]) <= 3 ) ;
else {
hyperpoint H2 = nisot::inverse_exp(H, nisot::iLazy);
for(hyperpoint& cpoint: clipping_planes) if((H2|cpoint) < -.2) return;
}
noclipped++;
}
if(pmodel == mdGeodesic && nil) {
using namespace hyperpoint_vec;
hyperpoint H = tC0(V);
if(abs(H[0]) <= 3 && abs(H[1]) <= 3 && abs(H[2]) <= 3 ) ;
else {
hyperpoint H2 = nisot::inverse_exp(H, nisot::iLazy);
for(hyperpoint& cpoint: clipping_planes) if((H2|cpoint) < -2) return;
}
noclipped++;
}
#endif
#if CAP_SHAPES