From e73c2f46e2ecba204a98906a8975d3b48228c9e4 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Tue, 14 Nov 2017 13:47:34 -0800 Subject: [PATCH] Only use vertex alpha if color layer is present. This was previously flagging far too many materials as transparent. --- src/Fbx2Raw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fbx2Raw.cpp b/src/Fbx2Raw.cpp index 9535037..62463d8 100644 --- a/src/Fbx2Raw.cpp +++ b/src/Fbx2Raw.cpp @@ -772,7 +772,7 @@ static void ReadMesh(RawModel &raw, FbxScene *pScene, FbxNode *pNode, const std: vertex.polarityUv0 = false; // 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);