mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
move the W=0 check, to be sure to check all the vertices
This commit is contained in:
@ -1171,7 +1171,6 @@ void SubmitPolygon()
|
||||
{
|
||||
posX = 0;
|
||||
posY = 0;
|
||||
poly->Degenerate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1218,6 +1217,8 @@ void SubmitPolygon()
|
||||
}
|
||||
|
||||
u32 w = (u32)vtx->Position[3];
|
||||
if (w == 0) poly->Degenerate = true;
|
||||
|
||||
while ((w >> wsize) && (wsize < 32))
|
||||
wsize += 4;
|
||||
}
|
||||
@ -1287,9 +1288,6 @@ void SubmitVertex()
|
||||
vertextrans->Position[2] = (vertex[0]*ClipMatrix[2] + vertex[1]*ClipMatrix[6] + vertex[2]*ClipMatrix[10] + vertex[3]*ClipMatrix[14]) >> 12;
|
||||
vertextrans->Position[3] = (vertex[0]*ClipMatrix[3] + vertex[1]*ClipMatrix[7] + vertex[2]*ClipMatrix[11] + vertex[3]*ClipMatrix[15]) >> 12;
|
||||
|
||||
//vertextrans->Position[3] &= 0x00FFFFFF;
|
||||
//if (vertextrans->Position[3] < 0) printf("NEGATIVE W: %08X\n", vertextrans->Position[3]);
|
||||
|
||||
// this probably shouldn't be.
|
||||
// the way color is handled during clipping needs investigation. TODO
|
||||
vertextrans->Color[0] = (VertexColor[0] << 12) + 0xFFF;
|
||||
|
Reference in New Issue
Block a user