summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2019-07-16 09:11:59 +0300
committerGitHub <noreply@github.com>2019-07-16 09:11:59 +0300
commit6b9d502195fd6d7f9f2700f85f803d3876081b89 (patch)
tree07e8fb313d21e35cbabef77333a43084e102e137
parent8202ba22127bdfbc51b351628c7e17377255831b (diff)
parentcfcc9ee9c158a04f9c904aa42ce89d33d7a38c79 (diff)
Merge pull request #30611 from Chaosus/local_array_init_fix
Allows to use non-constants in the local shader array initializer
-rw-r--r--servers/visual/shader_language.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index c39a0d4d02..14fefbf195 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -3958,10 +3958,6 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
if (!n) {
return ERR_PARSE_ERROR;
}
- if (n->type != Node::TYPE_CONSTANT) {
- _set_error("Expected constant expression in the array declaration");
- return ERR_PARSE_ERROR;
- }
if (var.type != n->get_datatype()) {
_set_error("Invalid assignment of '" + get_datatype_name(n->get_datatype()) + "' to '" + get_datatype_name(var.type) + "'");