bother doing any math, just fill the zf array
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11013
d7cf8633-e32d-0410-b094-
e92efae38249
float wslope = triangle->w[0];
float w = triangle->w[2] + span->x*wslope + span->y*triangle->w[1];
float endz = 1.0f / (w + wslope * startx);
+ if (triangle->w[0] == 0)
+ {
+ // LordHavoc: fast flat polygons (HUD/menu)
+ for (x = startx;x < endx;x++)
+ zf[x] = endz;
+ return;
+ }
for (x = startx;x < endx;)
{
int nextsub = x + DPSOFTRAST_DRAW_MAXSUBSPAN, endsub = nextsub - 1;