diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-06-09 13:12:55 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-06-10 10:04:28 +0300 |
commit | 7dd65a066e88aab5d5f53b6ebb305be9ba9f70cd (patch) | |
tree | c0111bc38d63e4f5ae7554f7b9274af4b1b60257 | |
parent | f178e7abd7d0af21d326f2e818bcd07a487b19fe (diff) |
Fix `length()` array function usage in shader
-rw-r--r-- | servers/rendering/shader_language.h | 2 |
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() : |