From 3a03fe31b12d482df5c5b0ec587deb93997eae0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=81=BF?= Date: Mon, 24 Jul 2023 10:28:01 +0800 Subject: [PATCH] gltf2 export diffuse roughness --- code/AssetLib/glTF2/glTF2Exporter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index 8777ac4ae..0f2da9e3d 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/code/AssetLib/glTF2/glTF2Exporter.cpp @@ -836,7 +836,7 @@ void glTF2Exporter::ExportMaterials() { GetMatTex(mat, m->pbrMetallicRoughness.baseColorTexture, aiTextureType_DIFFUSE); } - GetMatTex(mat, m->pbrMetallicRoughness.metallicRoughnessTexture, AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE); + GetMatTex(mat, m->pbrMetallicRoughness.metallicRoughnessTexture, aiTextureType_DIFFUSE_ROUGHNESS); if (GetMatColor(mat, m->pbrMetallicRoughness.baseColorFactor, AI_MATKEY_BASE_COLOR) != AI_SUCCESS) { // if baseColorFactor wasn't defined, then the source is likely not a metallic roughness material. @@ -870,7 +870,6 @@ void glTF2Exporter::ExportMaterials() { } } - GetMatTex(mat, m->normalTexture, aiTextureType_DIFFUSE_ROUGHNESS); GetMatTex(mat, m->normalTexture, aiTextureType_NORMALS); GetMatTex(mat, m->occlusionTexture, aiTextureType_LIGHTMAP); GetMatTex(mat, m->emissiveTexture, aiTextureType_EMISSIVE);