Skip to content

Commit

Permalink
Merge pull request libgdx#94 from Ranjit-S/MaterialTransparency
Browse files Browse the repository at this point in the history
Fixed Material Transparency Issue
  • Loading branch information
xoppa committed Nov 30, 2015
2 parents 9ed1138 + 946dc3f commit 2be464f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/readers/FbxConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,9 @@ namespace readers {
addTextures(result->id.c_str(), result->textures, lambert->NormalMap, Material::Texture::Normal);

if (lambert->TransparencyFactor.IsValid() && lambert->TransparentColor.IsValid()) {
FbxDouble factor = 1.f - lambert->TransparencyFactor.Get();
FbxDouble factor = lambert->TransparencyFactor.Get();
FbxDouble3 color = lambert->TransparentColor.Get();
FbxDouble trans = (color[0] * factor + color[1] * factor + color[2] * factor) / 3.0;
FbxDouble trans = 1.0f - ((color[0] * factor + color[1] * factor + color[2] * factor) / 3.0);
result->opacity.set((float)trans);
}
else if (lambert->TransparencyFactor.IsValid())
Expand Down

0 comments on commit 2be464f

Please sign in to comment.