From 70622f2ba44cffa0dc1b697497125b83b456ca93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Wed, 12 Jun 2019 23:41:44 +0200 Subject: [PATCH] Remove unneeded condition --- small3dlib.h | 15 --------------- todo.txt | 7 +++++-- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/small3dlib.h b/small3dlib.h index 88d7b6b..77d8ae4 100644 --- a/small3dlib.h +++ b/small3dlib.h @@ -1941,21 +1941,6 @@ void S3L_drawTriangle( loop */ #endif - if (rXClipped < lXClipped && - lXClipped < S3L_RESOLUTION_X && rXClipped >= 0) - { - // TODO: After the change to computing the L/R, is this needed anymore? - - /* This can sometimes happen because of numerical errors in sorting - left vs right triangle point, which are compared based on SLOPE, not - x coordinates. Here we swap the values to prevents not drawing the - triagle. */ - - S3L_ScreenCoord tmp = rXClipped; - rXClipped = lXClipped; - lXClipped = tmp; - } - // draw the row -- inner loop: #if S3L_PERSPECTIVE_CORRECTION == 2 diff --git a/todo.txt b/todo.txt index 828af0b..04ccf29 100644 --- a/todo.txt +++ b/todo.txt @@ -69,13 +69,16 @@ features: bugs: -- Determining CW/CCW for a triangle is not 100% exact, sometimes leaves holes in - models (some very thin triangles)! +- Determining CW/CCW for a triangle is not 100% exact, sometimes leaves holes + in models (some very thin triangles)! - Barycentric coodinates can get wrong in these ways: - Any of them can exceed the range <0,511> - b0 + b1 can be > 511, which causes b2 (= 511 - b0 - b1) to be negative! +- There still ocassionally appear holes between rasterized triangles -- can be + well seen in Pokitto demo when drawing with single color. + repeated: - valgrind (and similar) checks