summaryrefslogtreecommitdiff
path: root/editor/import
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-20 11:46:01 +0200
committerGitHub <noreply@github.com>2019-06-20 11:46:01 +0200
commitb9f8e072ce0893be378654869baf8a07c86199be (patch)
treef2e77c1c66be28bd693ef8d1aaf261b227418aee /editor/import
parent974b07fc70d4d2b984840c9cb4610e4c0c350d08 (diff)
parenteb7983377081651e120487a095101c94343ea203 (diff)
Merge pull request #26205 from Calinou/spatialmaterial-use-packed-channels
Tweak SpatialMaterial's default metallic and roughness texture channels
Diffstat (limited to 'editor/import')
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index c97021433b..2bfc77325f 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -1326,9 +1326,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
if (bct.has("index")) {
Ref<Texture> t = _get_texture(state, bct["index"]);
material->set_texture(SpatialMaterial::TEXTURE_METALLIC, t);
- material->set_metallic_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_BLUE);
material->set_texture(SpatialMaterial::TEXTURE_ROUGHNESS, t);
- material->set_roughness_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_GREEN);
if (!mr.has("metallicFactor")) {
material->set_metallic(1);
}
@@ -1353,7 +1351,6 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
Dictionary bct = d["occlusionTexture"];
if (bct.has("index")) {
material->set_texture(SpatialMaterial::TEXTURE_AMBIENT_OCCLUSION, _get_texture(state, bct["index"]));
- material->set_ao_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_RED);
material->set_feature(SpatialMaterial::FEATURE_AMBIENT_OCCLUSION, true);
}
}