From 3268f94f4bd9c8d64b9afb71d1f4a611ef5cc70c Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Sun, 10 Dec 2023 15:52:28 -0500 Subject: [PATCH] remove an optimization for swapped polygons why did i optimize swapped polygons? they're not that common. --- src/GPU3D_Soft.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/GPU3D_Soft.h b/src/GPU3D_Soft.h index 9b284932..b1ea641c 100644 --- a/src/GPU3D_Soft.h +++ b/src/GPU3D_Soft.h @@ -352,13 +352,10 @@ private: { // only do length calc for right side when swapped as it's // only needed for aa calcs, as actual line spans are broken - if (!swapped || side) - { - if (side ^ Negative) - *length = (dx >> 18) - ((dx-Increment) >> 18); - else - *length = ((dx+Increment) >> 18) - (dx >> 18); - } + if (side ^ Negative) + *length = (dx >> 18) - ((dx-Increment) >> 18); + else + *length = ((dx+Increment) >> 18) - (dx >> 18); // for X-major edges, we return the coverage // for the first pixel, and the increment for