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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user