From 668bb0a44cc993725c1f0d2b419e498070c24cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 2 Jun 2019 22:49:50 +0200 Subject: [PATCH] Fix inefficiency in PC --- small3dlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/small3dlib.h b/small3dlib.h index 5eca0c3..eb7dc4d 100644 --- a/small3dlib.h +++ b/small3dlib.h @@ -1542,7 +1542,7 @@ void S3L_drawTriangle( #if S3L_COMPUTE_DEPTH #if S3L_PERSPECTIVE_CORRECTION == 1 p.depth = (S3L_FRACTIONS_PER_UNIT * S3L_FRACTIONS_PER_UNIT) / - S3L_nonZero(S3L_interpolate(lRecipZ,rRecipZ,x - lX,rX - lX)); + S3L_nonZero(S3L_interpolate(lRecipZ,rRecipZ,i,rowLength)); #else p.depth = S3L_getFastLerpValue(depthFLS); S3L_stepFastLerp(depthFLS);