summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-07 20:45:57 +0100
committerGitHub <noreply@github.com>2020-02-07 20:45:57 +0100
commitcdce912de7adb83fd369d83dc707b9de4cc1c934 (patch)
tree680e2f7059a3822232842a5251efae52fa72d64d
parent6b42d83ff10f37f52780d0f7fea9bce9116c4945 (diff)
parent8469a383ec704ddeef04f9c9249e42ca66ab5b13 (diff)
Merge pull request #35986 from Chaosus/shader_index
Allow non-constants for indexing builtin types in shaders
-rw-r--r--servers/visual/shader_language.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 5002c18baf..98ccfcfc68 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -3301,9 +3301,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Index out of range (0-1)");
return NULL;
}
- } else {
- _set_error("Only integer constants are allowed as index at the moment");
- return NULL;
}
switch (expr->get_datatype()) {
@@ -3327,9 +3324,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Index out of range (0-2)");
return NULL;
}
- } else {
- _set_error("Only integer constants are allowed as index at the moment");
- return NULL;
}
switch (expr->get_datatype()) {
@@ -3352,9 +3346,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
_set_error("Index out of range (0-3)");
return NULL;
}
- } else {
- _set_error("Only integer constants are allowed as index at the moment");
- return NULL;
}
switch (expr->get_datatype()) {