mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -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;
|
posX = 0;
|
||||||
posY = 0;
|
posY = 0;
|
||||||
poly->Degenerate = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1218,6 +1217,8 @@ void SubmitPolygon()
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 w = (u32)vtx->Position[3];
|
u32 w = (u32)vtx->Position[3];
|
||||||
|
if (w == 0) poly->Degenerate = true;
|
||||||
|
|
||||||
while ((w >> wsize) && (wsize < 32))
|
while ((w >> wsize) && (wsize < 32))
|
||||||
wsize += 4;
|
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[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] = (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.
|
// this probably shouldn't be.
|
||||||
// the way color is handled during clipping needs investigation. TODO
|
// the way color is handled during clipping needs investigation. TODO
|
||||||
vertextrans->Color[0] = (VertexColor[0] << 12) + 0xFFF;
|
vertextrans->Color[0] = (VertexColor[0] << 12) + 0xFFF;
|
||||||
|
Reference in New Issue
Block a user