This commit is contained in:
Milang 2019-10-25 22:47:17 +02:00
parent be6214a41e
commit 9731133706
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ int render_triangle_nobfc(fe_point const s1, fe_point const s2, fe_point const s
const int32_t ymin = max(min(s1->y, min(s2->y, s3->y)), 0);
const int32_t ymax = min(max(s1->y, max(s2->y, s3->y)), 63);
const int32_t xAB = s2.x - s1.x, yAB = s2.y - s1.y, zAB=s2->z-s1.z;
const int32_t xAC = s3.x - s1.x, yAC = s3.y - s1.y, zAC=s3->z-s1.z;
const int32_t xAB = s2.x - s1.x, yAB = s2.y - s1.y, zAB=s2.z-s1.z;
const int32_t xAC = s3.x - s1.x, yAC = s3.y - s1.y, zAC=s3.z-s1.z;
const int32_t diviseur_commun = (xAB * yAC - yAB * xAC);
const int32_t fact_1= (32768 * yAC) / diviseur_commun, fact_2 = (32768 * xAC) / diviseur_commun;