Merge pull request #19690 from rodolforg/fix-gltf-import-parameters

fix default glTF metallic & roughness factor values
This commit is contained in:
Rémi Verschelde 2018-06-21 08:35:28 +02:00 committed by GitHub
commit 0254616c37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1256,12 +1256,15 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
}
if (mr.has("metallicFactor")) {
material->set_metallic(mr["metallicFactor"]);
} else {
material->set_metallic(1.0);
}
if (mr.has("roughnessFactor")) {
if (mr.has("roughnessFactor")) {
material->set_roughness(mr["roughnessFactor"]);
} else {
material->set_roughness(1.0);
}
if (mr.has("metallicRoughnessTexture")) {