Pārlūkot izejas kodu

fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbrMetallicRoughness/baseColorFactor

tangxin 1 gadu atpakaļ
vecāks
revīzija
9776d47cca
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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;