summaryrefslogtreecommitdiff
path: root/scene/resources/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/shader.cpp')
-rw-r--r--scene/resources/shader.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index e47b2432f2..f3e625917a 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -144,10 +144,13 @@ void Shader::_set_code(const Dictionary& p_string) {
void Shader::set_default_texture_param(const StringName& p_param,const Ref<Texture>& p_texture) {
- if (p_texture.is_valid())
+ if (p_texture.is_valid()) {
default_textures[p_param]=p_texture;
- else
+ VS::get_singleton()->shader_set_default_texture_param(shader,p_param,p_texture->get_rid());
+ } else {
default_textures.erase(p_param);
+ VS::get_singleton()->shader_set_default_texture_param(shader,p_param,RID());
+ }
}
Ref<Texture> Shader::get_default_texture_param(const StringName& p_param) const{