diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp index 9e8dfc822..1001a2d94 100644 --- a/code/glTF2Exporter.cpp +++ b/code/glTF2Exporter.cpp @@ -514,9 +514,9 @@ void glTF2Exporter::ExportMaterials() GetMatColor(mat, pbrSG.specularFactor, AI_MATKEY_COLOR_SPECULAR); if (mat->Get(AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_GLOSSINESS_FACTOR, pbrSG.glossinessFactor) != AI_SUCCESS) { - float shininess; + float shininess; - if (mat->Get(AI_MATKEY_SHININESS, shininess)) { + if (mat->Get(AI_MATKEY_SHININESS, shininess) == AI_SUCCESS) { pbrSG.glossinessFactor = shininess / 1000; } }