summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-06-10 11:07:59 +0300
committerGitHub <noreply@github.com>2021-06-10 11:07:59 +0300
commit9539e4e39e489e750c7ec99d84b93dce283fe721 (patch)
tree92f7ae2033835fe4a89eb5c95115454e9259a33e /servers/rendering
parent58c123511167cf5679d3bcf19f66efe8dbfd4db0 (diff)
parent7dd65a066e88aab5d5f53b6ebb305be9ba9f70cd (diff)
Merge pull request #49456 from Chaosus/fix_shader_length
Fix `length()` array function usage in shader
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/shader_language.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index af66e32e06..4120e04ee1 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -447,7 +447,7 @@ public:
virtual DataType get_datatype() const override { return datatype_cache; }
virtual String get_datatype_name() const override { return String(struct_name); }
- virtual int get_array_size() const override { return array_size; }
+ virtual int get_array_size() const override { return (index_expression || call_expression) ? 0 : array_size; }
virtual bool is_indexed() const override { return index_expression != nullptr; }
ArrayNode() :