Only use vertex alpha if color layer is present.

This was previously flagging far too many materials as transparent.
This commit is contained in:
Par Winzell 2017-11-14 13:47:34 -08:00
parent 7f8746f56e
commit e73c2f46e2
1 changed files with 1 additions and 1 deletions

View File

@ -772,7 +772,7 @@ static void ReadMesh(RawModel &raw, FbxScene *pScene, FbxNode *pNode, const std:
vertex.polarityUv0 = false; vertex.polarityUv0 = false;
// flag this triangle as transparent if any of its corner vertices substantially deviates from fully opaque // flag this triangle as transparent if any of its corner vertices substantially deviates from fully opaque
vertexTransparency |= (fabs(fbxColor.mAlpha - 1.0) > 1e-3); vertexTransparency |= colorLayer.LayerPresent() && (fabs(fbxColor.mAlpha - 1.0) > 1e-3);
rawSurface.bounds.AddPoint(vertex.position); rawSurface.bounds.AddPoint(vertex.position);