From 8b8faf03d5013dda77ecfd9031ef6f0f45e4e760 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Mon, 2 Dec 2019 19:00:21 +0300 Subject: [PATCH] Fix expressions for global constants in shaders --- servers/visual/shader_language.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 316a94556d1..a7ff4f35db2 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -5099,7 +5099,7 @@ Error ShaderLanguage::_parse_shader(const Map &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; }