Explorar o código

fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbrMetallicRoughness/baseColorFactor

tangxin hai 1 ano
pai
achega
9776d47cca
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      code/AssetLib/glTF2/glTF2Exporter.cpp

+ 1 - 0
code/AssetLib/glTF2/glTF2Exporter.cpp

@@ -912,6 +912,7 @@ void glTF2Exporter::ExportMaterials() {
                 if (GetMatSpecular(mat, specular)) {
                     mAsset->extensionsUsed.KHR_materials_specular = true;
                     m->materialSpecular = Nullable<MaterialSpecular>(specular);
+                    GetMatColor(mat, m->pbrMetallicRoughness.baseColorFactor, AI_MATKEY_COLOR_DIFFUSE);
                 }
 
                 MaterialSheen sheen;