mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-24 01:52:28 +00:00
3d:: clipping without OpenGL
This commit is contained in:
1 parent
f8fe631eca
commit
8ea5a618ad
2 files changed
+22
-8
No files matched your search
+9
-2
@@ -366,8 +366,15 @@ void addpoint(const hyperpoint& H) {
|
||||
}
|
||||
hyperpoint Hscr;
|
||||
applymodel(H, Hscr);
|
||||
for(int i=0; i<3; i++) Hscr[i] *= z;
|
||||
Hscr[1] *= vid.stretch;
|
||||
if(DIM == 2) {
|
||||
for(int i=0; i<3; i++) Hscr[i] *= z;
|
||||
Hscr[1] *= vid.stretch;
|
||||
}
|
||||
else {
|
||||
Hscr[0] *= z;
|
||||
Hscr[1] *= z * vid.stretch;
|
||||
Hscr[2] = 1 - 2 * (-Hscr[2] - conformal::clip_min) / (conformal::clip_max - conformal::clip_min);
|
||||
}
|
||||
add1(Hscr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user