summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2019-12-02 19:00:21 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2019-12-02 19:00:21 +0300
commit8b8faf03d5013dda77ecfd9031ef6f0f45e4e760 (patch)
tree5dad1aa54130f466d8cad986e49dd85e409da6d8 /servers/visual
parent9607fc48a0134b289fe62f327db1f160d70fac24 (diff)
Fix expressions for global constants in shaders
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/shader_language.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 316a94556d..a7ff4f35db 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -5099,7 +5099,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
if (!expr)
return ERR_PARSE_ERROR;
- if (expr->type != Node::TYPE_CONSTANT) {
+ if (expr->type == Node::TYPE_OPERATOR && ((OperatorNode *)expr)->op == OP_CALL) {
_set_error("Expected constant expression after '='");
return ERR_PARSE_ERROR;
}