1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-12-22 01:26:17 +01:00

Remove unneeded condition

This commit is contained in:
Miloslav Číž 2019-06-12 23:41:44 +02:00
parent a2283732f0
commit 70622f2ba4
2 changed files with 5 additions and 17 deletions

View file

@ -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

View file

@ -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