GPU3D: swap vin and vout during clipping, giving results that are closer to hardware.

fixes #598 and also fixes #379
This commit is contained in:
Arisotura 2020-04-11 23:56:36 +02:00
parent d412630a49
commit 4c560f3324
2 changed files with 3 additions and 3 deletions

View File

@ -888,7 +888,7 @@ void StallPolygonPipeline(s32 delay, s32 nonstalldelay)
template<int comp, s32 plane, bool attribs>
void ClipSegment(Vertex* outbuf, Vertex* vout, Vertex* vin)
void ClipSegment(Vertex* outbuf, Vertex* vin, Vertex* vout)
{
s64 factor_num = vin->Position[3] - (plane*vin->Position[comp]);
s32 factor_den = factor_num - (vout->Position[3] - (plane*vout->Position[comp]));

View File

@ -336,8 +336,8 @@ void Update()
colA &= mask;
colB &= mask;
if (colA == colB) WinBitmapData[(y*768) + x + 512] = 0xFF00FF00;
else WinBitmapData[(y*768) + x + 512] = 0xFFFF0000;
if (colA == colB) WinBitmapData[(y*768) + x + 512] = 0xFF000000;//0xFF00FF00;
else WinBitmapData[(y*768) + x + 512] = 0xFFFFFFFF;//0xFFFF0000;
}
}