From 4b513e23ee83592819513ed82c5ba5876d3513d7 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 11 Mar 2017 20:25:08 -0500 Subject: [PATCH] DS GX: Finish box test --- src/ds/gx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ds/gx.c b/src/ds/gx.c index ebc1d4578..a559838aa 100644 --- a/src/ds/gx.c +++ b/src/ds/gx.c @@ -385,13 +385,19 @@ static bool _boxTestVertex(struct DSGX* gx, struct DSGXVertex* vertex) { if (vx < gx->viewportX1) { return false; } - if (vx >= gx->viewportX2) { + if (vx > gx->viewportX2) { return false; } if (vy < gx->viewportY1) { return false; } - if (vy >= gx->viewportY2) { + if (vy > gx->viewportY2) { + return false; + } + if (vz < -vw) { + return false; + } + if (vz > vw) { return false; } // TODO: depth clipping