From 8aa68d61876aa0314151474e49acf1d6e5e9a014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sun, 23 Jun 2019 00:29:05 +0200 Subject: [PATCH] Add comments --- small3dlib.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/small3dlib.h b/small3dlib.h index 5c7998c..fb68857 100644 --- a/small3dlib.h +++ b/small3dlib.h @@ -2080,7 +2080,14 @@ void S3L_drawTriangle( #endif #if S3L_PERSPECTIVE_CORRECTION == 2 - S3L_FastLerpState depthPC, b0PC, b1PC; + S3L_FastLerpState + depthPC, // interpolates depth between row segments + b0PC, // interpolates barycentric0 between row segments + b1PC; // interpolates barycentric1 between row segments + + /* ^ These interpolate values between row segments (lines of pixels + of S3L_PC_APPROX_LENGTH length). After each row segment perspective + correction is recomputed. */ depthPC.valueScaled = (Z_RECIP_NUMERATOR /