fixed bug to prevent deleted faces rasterization
This commit is contained in:
parent
a464fed6ae
commit
9d1e54a140
|
@ -1376,11 +1376,13 @@ static void Texture(MetroMesh & m, VertexSampler &ps, int textureWidth, int text
|
|||
|
||||
printf("Similar Triangles face sampling\n");
|
||||
for(fi=m.face.begin(); fi != m.face.end(); fi++)
|
||||
if (!fi->IsD())
|
||||
{
|
||||
Point2f ti[3];
|
||||
for(int i=0;i<3;++i)
|
||||
ti[i]=Point2f((*fi).WT(i).U() * textureWidth - 0.5, (*fi).WT(i).V() * textureHeight - 0.5);
|
||||
// +/- 0.5 constants are used to obtain correct texture mapping
|
||||
// - 0.5 constants are used to obtain correct texture mapping
|
||||
|
||||
SingleFaceRaster(*fi, ps, ti[0],ti[1],ti[2], correctSafePointsBaryCoords);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue