mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Allow passing non-variable constant to const function param in shaders
This commit is contained in:
parent
0deccc550c
commit
f4c0e90fd9
3 changed files with 26 additions and 17 deletions
|
|
@ -4920,7 +4920,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||
bool error = false;
|
||||
Node *n = func->arguments[argidx];
|
||||
if (n->type == Node::TYPE_CONSTANT || n->type == Node::TYPE_OPERATOR) {
|
||||
error = true;
|
||||
if (!call_function->arguments[i].is_const) {
|
||||
error = true;
|
||||
}
|
||||
} else if (n->type == Node::TYPE_ARRAY) {
|
||||
ArrayNode *an = static_cast<ArrayNode *>(n);
|
||||
if (an->call_expression != nullptr || an->is_const) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue