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:
14
graph.cpp
14
graph.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user