diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-10-17 14:38:26 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-11-12 12:53:40 +0300 |
commit | 826e781bfa90f55eed579e9b512a19b0c1c19ba4 (patch) | |
tree | 5c6f1a88cfed28ab09ff3e959e1c724dcdbebae1 /editor | |
parent | 13769aebe9d435b9041f4ec8dc6f4b277a87b444 (diff) |
Fix default_texture_param in shader pipeline to support uniform arrays
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 4 |
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; |