diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-12-03 08:53:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-03 08:53:55 +0100 |
commit | e77c34ab4af4cc979ba43128f70ff475bd3b26e9 (patch) | |
tree | 05e5820aeb20cf9905f0393099f420a159eb80b5 | |
parent | 10bae7c05b18b73b39fbaf5c118780512832f0b3 (diff) | |
parent | 8b8faf03d5013dda77ecfd9031ef6f0f45e4e760 (diff) |
Merge pull request #34061 from Chaosus/fix_shader_const
Fix expressions for global constants in shaders
-rw-r--r-- | servers/visual/shader_language.cpp | 2 |
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; } |