some work on extreme/degenerate shit in GPU

* clip against Z then Y then X. apparently, fixes #310. I had also observed hints that the hardware does it this way.
* truncate W to 24 bits before viewport transform.
* mark any polygons that have a W=0 at that point as degenerate. do not render.
This commit is contained in:
StapleButter
2018-12-20 01:31:31 +01:00
parent 1a8b18af2c
commit f6e6fa05ea
3 changed files with 32 additions and 9 deletions

View File

@ -2047,12 +2047,10 @@ void ClearBuffers()
void RenderPolygons(bool threaded, Polygon** polygons, int npolys)
{
// polygons with ybottom>192 aren't rendered at all
int j = 0;
for (int i = 0; i < npolys; i++)
{
if (polygons[i]->YBottom > 192) continue;
if (polygons[i]->Degenerate) continue;
SetupPolygon(&PolygonList[j++], polygons[i]);
}