From 259abf79ddeba96c95e90d7925d03eb09267b9bb Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 19 Sep 2022 08:36:59 -0700 Subject: [PATCH] softgpu: Skip more triangles with equal verts. Even if X is not equal, if all Y are equal, we can still skip. This seems to happen more often than I expected with far away objects. Skipping here avoids filling up the queue. --- GPU/Software/BinManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/Software/BinManager.cpp b/GPU/Software/BinManager.cpp index 7fee77b64c..a1fb22bee6 100644 --- a/GPU/Software/BinManager.cpp +++ b/GPU/Software/BinManager.cpp @@ -326,7 +326,7 @@ void BinManager::AddTriangle(const VertexData &v0, const VertexData &v1, const V if (d01.x * d02.y - d01.y * d02.x < 0) return; // If all points have identical coords, we'll have 0 weights and not skip properly, so skip here. - if (d01.x == 0 && d01.y == 0 && d02.x == 0 && d02.y == 0) + if ((d01.x == 0 && d02.x == 0) || (d01.y == 0 && d02.y == 0)) return; // Was it fully outside the scissor?