summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-12 12:23:34 +0100
committerGitHub <noreply@github.com>2021-11-12 12:23:34 +0100
commita54bd6e868a3cbaf8c9033815a798a3f5c1107ef (patch)
tree819476e2f71099a386b3e7dccd548818ddca0143 /editor/plugins
parent55b49dc71b687b9edf640ae2264879852f0b0503 (diff)
parent826e781bfa90f55eed579e9b512a19b0c1c19ba4 (diff)
Merge pull request #53914 from Chaosus/shader_default_texture_param
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index f87b1c2be1..140ee0cffc 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -5217,7 +5217,9 @@ void VisualShaderNodePortPreview::_shader_changed() {
preview_shader.instantiate();
preview_shader->set_code(shader_code);
for (int i = 0; i < default_textures.size(); i++) {
- preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].param);
+ for (int j = 0; j < default_textures[i].params.size(); j++) {
+ preview_shader->set_default_texture_param(default_textures[i].name, default_textures[i].params[j], j);
+ }
}
Ref<ShaderMaterial> material;