mirror of
https://git.coom.tech/drummyfish/small3dlib.git
synced 2024-11-20 20:29:58 +01:00
Fix formatting
This commit is contained in:
parent
e4fa1a714f
commit
d72ca57d2a
1 changed files with 28 additions and 29 deletions
57
small3dlib.h
57
small3dlib.h
|
@ -2422,33 +2422,32 @@ void S3L_drawTriangle(
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if S3L_NEAR_CROSS_STRATEGY == 3
|
#if S3L_NEAR_CROSS_STRATEGY == 3
|
||||||
|
if (_S3L_projectedTriangleState != 0)
|
||||||
|
{
|
||||||
|
S3L_Unit newBarycentric[3];
|
||||||
|
|
||||||
if (_S3L_projectedTriangleState != 0)
|
newBarycentric[0] = S3L_interpolateBarycentric(
|
||||||
{
|
_S3L_triangleRemapBarycentrics[0].x,
|
||||||
S3L_Unit newBarycentric[3];
|
_S3L_triangleRemapBarycentrics[1].x,
|
||||||
|
_S3L_triangleRemapBarycentrics[2].x,
|
||||||
|
p.barycentric);
|
||||||
|
|
||||||
newBarycentric[0] = S3L_interpolateBarycentric(
|
newBarycentric[1] = S3L_interpolateBarycentric(
|
||||||
_S3L_triangleRemapBarycentrics[0].x,
|
_S3L_triangleRemapBarycentrics[0].y,
|
||||||
_S3L_triangleRemapBarycentrics[1].x,
|
_S3L_triangleRemapBarycentrics[1].y,
|
||||||
_S3L_triangleRemapBarycentrics[2].x,
|
_S3L_triangleRemapBarycentrics[2].y,
|
||||||
p.barycentric);
|
p.barycentric);
|
||||||
|
|
||||||
newBarycentric[1] = S3L_interpolateBarycentric(
|
newBarycentric[2] = S3L_interpolateBarycentric(
|
||||||
_S3L_triangleRemapBarycentrics[0].y,
|
_S3L_triangleRemapBarycentrics[0].z,
|
||||||
_S3L_triangleRemapBarycentrics[1].y,
|
_S3L_triangleRemapBarycentrics[1].z,
|
||||||
_S3L_triangleRemapBarycentrics[2].y,
|
_S3L_triangleRemapBarycentrics[2].z,
|
||||||
p.barycentric);
|
p.barycentric);
|
||||||
|
|
||||||
newBarycentric[2] = S3L_interpolateBarycentric(
|
p.barycentric[0] = newBarycentric[0];
|
||||||
_S3L_triangleRemapBarycentrics[0].z,
|
p.barycentric[1] = newBarycentric[1];
|
||||||
_S3L_triangleRemapBarycentrics[1].z,
|
p.barycentric[2] = newBarycentric[2];
|
||||||
_S3L_triangleRemapBarycentrics[2].z,
|
}
|
||||||
p.barycentric);
|
|
||||||
|
|
||||||
p.barycentric[0] = newBarycentric[0];
|
|
||||||
p.barycentric[1] = newBarycentric[1];
|
|
||||||
p.barycentric[2] = newBarycentric[2];
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
S3L_PIXEL_FUNCTION(&p);
|
S3L_PIXEL_FUNCTION(&p);
|
||||||
} // tests passed
|
} // tests passed
|
||||||
|
@ -2772,12 +2771,12 @@ void _S3L_projectTriangle(
|
||||||
transformed[5] = transformed[infrontI[0]];
|
transformed[5] = transformed[infrontI[0]];
|
||||||
|
|
||||||
#if S3L_NEAR_CROSS_STRATEGY == 3
|
#if S3L_NEAR_CROSS_STRATEGY == 3
|
||||||
_S3L_triangleRemapBarycentrics[3] =
|
_S3L_triangleRemapBarycentrics[3] =
|
||||||
_S3L_triangleRemapBarycentrics[behindI[1]];
|
_S3L_triangleRemapBarycentrics[behindI[1]];
|
||||||
_S3L_triangleRemapBarycentrics[4] =
|
_S3L_triangleRemapBarycentrics[4] =
|
||||||
_S3L_triangleRemapBarycentrics[infrontI[0]];
|
_S3L_triangleRemapBarycentrics[infrontI[0]];
|
||||||
_S3L_triangleRemapBarycentrics[5] =
|
_S3L_triangleRemapBarycentrics[5] =
|
||||||
_S3L_triangleRemapBarycentrics[infrontI[0]];
|
_S3L_triangleRemapBarycentrics[infrontI[0]];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (uint8_t i = 0; i < 2; ++i)
|
for (uint8_t i = 0; i < 2; ++i)
|
||||||
|
|
Loading…
Reference in a new issue