- column_numpoints = PolygonF_Clip(row_numpoints , clipbuf[2][0], column_plane[0], column_plane[1], column_plane[2], triangle->lmbase[0] + x / triangle->lmscale[0] , LM_DIST_EPSILON, 8, clipbuf[3][0]);
- if (!column_numpoints)
- continue;
- column_numpoints = PolygonF_Clip(column_numpoints, clipbuf[3][0], -column_plane[0], -column_plane[1], -column_plane[2], -(triangle->lmbase[0] + (x+1) / triangle->lmscale[0]), LM_DIST_EPSILON, 8, clipbuf[4][0]);
- if (!column_numpoints)
- continue;
- // we now have a polygon fragment in clipbuf[4], we can
- // sample its center or subdivide it further for
- // antialiasing
- VectorClear(samplecenter);
- for (j = 0;j < column_numpoints;j++)
- VectorAdd(samplecenter, clipbuf[4][j], samplecenter);
- f = 1.0f / column_numpoints;
- VectorScale(samplecenter, f, samplecenter);
- VectorMA(samplecenter, 0.125f, trianglenormal, samplecenter);
+ samplecenter[axis1] = x*lmiscale[0] + triangle->lmbase[0];
+ samplecenter[axis2] = y*lmiscale[1] + triangle->lmbase[1];
+ samplecenter[axis] = samplecenter[axis1]*slopex + samplecenter[axis2]*slopey + slopebase;
+ //(triangle->vertex[j][axis1] - triangle->lmbase[0]) * triangle->lmscale[0] + triangle->lmoffset[0];
+ //(triangle->vertex[j][axis2] - triangle->lmbase[1]) * triangle->lmscale[1] + triangle->lmoffset[1];
+ VectorMA(samplecenter, 0.125f, samplenormal, samplecenter);