Merge pull request #19690 from rodolforg/fix-gltf-import-parameters
fix default glTF metallic & roughness factor values
This commit is contained in:
commit
0254616c37
1 changed files with 5 additions and 2 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue