1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials

RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial()
now reset matallic factor to 0.0f in case of transparent color.
This commit is contained in:
kgv
2021-08-10 17:23:44 +03:00
committed by bugmaster
parent 45fc824bac
commit aeef9e2c13
2 changed files with 7 additions and 2 deletions

View File

@@ -420,6 +420,7 @@ void RWGltf_GltfMaterialMap::DefineMaterial (const XCAFPrs_Style& theStyle,
aPbrMat.BaseColor.SetRGB (theStyle.GetColorSurf());
if (theStyle.GetColorSurfRGBA().Alpha() < 1.0f)
{
aPbrMat.Metallic = 0.0f;
aPbrMat.BaseColor.SetAlpha (theStyle.GetColorSurfRGBA().Alpha());
}
}