From 9776d47ccad48cbd4ea7869e93df9e8e8244615c Mon Sep 17 00:00:00 2001 From: tangxin Date: Fri, 5 Jan 2024 10:02:26 +0800 Subject: [PATCH] fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert to pbrMetallicRoughness/baseColorFactor --- code/AssetLib/glTF2/glTF2Exporter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index 836e15f9f..17d162466 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/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(specular); + GetMatColor(mat, m->pbrMetallicRoughness.baseColorFactor, AI_MATKEY_COLOR_DIFFUSE); } MaterialSheen sheen;