From dfd1393dba4736a4b3b88e4579448d9fa357424e Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Mon, 3 Feb 2025 20:06:52 +0100 Subject: [PATCH] Fix culling --- renderer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderer.h b/renderer.h index 3489949..884ca87 100644 --- a/renderer.h +++ b/renderer.h @@ -663,8 +663,9 @@ uint8_t _LCR_rendererCheckMapTriCover(const S3L_Index *t1, const S3L_Index *t2) points2D[12] = LCR_renderer.mapVerts[3 * t3[freeVert] + coordX]; points2D[13] = LCR_renderer.mapVerts[3 * t3[freeVert] + coordY]; - - if (_LCR_rendererQuadCoversTri(points2D + 6,points2D)) + + if (_LCR_rendererQuadLooksConvex(points2D +6) && + _LCR_rendererQuadCoversTri(points2D + 6,points2D)) { result |= 1 << j; break;