diff options
author | SaracenOne <SaracenOne@gmail.com> | 2021-12-21 22:19:00 +0000 |
---|---|---|
committer | SaracenOne <SaracenOne@gmail.com> | 2022-01-06 16:07:26 +0000 |
commit | 901f376671aef8138063072a3b924f52af14701d (patch) | |
tree | 733fb5b537403b685d4b75b085b580cb5e3b729c /scene/resources/material.cpp | |
parent | f57bdf13af3e99b0f0235909eecc428d913c9b01 (diff) |
Move metallic and roughness automated assignment to an inspector UndoRedo
callback.
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r-- | scene/resources/material.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index b36204241a..f3e5ece1f9 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -1659,18 +1659,6 @@ bool BaseMaterial3D::get_feature(Feature p_feature) const { void BaseMaterial3D::set_texture(TextureParam p_param, const Ref<Texture2D> &p_texture) { ERR_FAIL_INDEX(p_param, TEXTURE_MAX); - if (get_texture(TEXTURE_ROUGHNESS).is_null() && p_texture.is_valid() && p_param == TEXTURE_ROUGHNESS) { - // If no roughness texture is currently set, automatically set the recommended value - // for roughness when using a roughness map. - set_roughness(1.0); - } - - if (get_texture(TEXTURE_METALLIC).is_null() && p_texture.is_valid() && p_param == TEXTURE_METALLIC) { - // If no metallic texture is currently set, automatically set the recommended value - // for metallic when using a metallic map. - set_metallic(1.0); - } - textures[p_param] = p_texture; RID rid = p_texture.is_valid() ? p_texture->get_rid() : RID(); RS::get_singleton()->material_set_param(_get_material(), shader_names->texture_names[p_param], rid); |