diff options
| author | Rodolfo Ribeiro Gomes | 2018-06-20 23:44:08 -0300 |
|---|---|---|
| committer | Rodolfo Ribeiro Gomes | 2018-06-21 00:00:58 -0300 |
| commit | 01b01209a3ec3da4df17b03d401560bb664772c6 (patch) | |
| tree | 08015510ea889c137513df8d653e7828eea31f93 | |
| parent | a9acdd84b7a6fd074f21d500a64976326f6cbb67 (diff) | |
| download | godot-01b01209a3ec3da4df17b03d401560bb664772c6.tar.gz godot-01b01209a3ec3da4df17b03d401560bb664772c6.tar.zst godot-01b01209a3ec3da4df17b03d401560bb664772c6.zip | |
| -rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 07a4cf588..777f757bb 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -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")) { |
