diff options
| author | StapleButter <thetotalworm@gmail.com> | 2018-12-20 01:40:32 +0100 | 
|---|---|---|
| committer | StapleButter <thetotalworm@gmail.com> | 2018-12-20 01:40:32 +0100 | 
| commit | f86fe460350838d288a4515ac3b3865874a53e5b (patch) | |
| tree | d82e39b0c56a2736bef1a78dd506b82101132f7a /src | |
| parent | f6e6fa05ea24f9fb8e23f4cdd9541ab3113fd296 (diff) | |
move the W=0 check, to be sure to check all the vertices
Diffstat (limited to 'src')
| -rw-r--r-- | src/GPU3D.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index b7a57f6..6e57d4a 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -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;  |