Fix few places in shaders where const passing still incorrect
This commit is contained in:
parent
4dede9e644
commit
b6ca9536f2
1 changed files with 4 additions and 2 deletions
|
@ -3560,7 +3560,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||
error = true;
|
||||
} else if (n->type == Node::TYPE_ARRAY) {
|
||||
ArrayNode *an = static_cast<ArrayNode *>(n);
|
||||
if (an->call_expression != nullptr) {
|
||||
if (an->call_expression != nullptr || an->is_const) {
|
||||
error = true;
|
||||
}
|
||||
} else if (n->type == Node::TYPE_VARIABLE) {
|
||||
|
@ -3569,7 +3569,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||
error = true;
|
||||
} else {
|
||||
StringName varname = vn->name;
|
||||
if (shader->uniforms.has(varname)) {
|
||||
if (shader->constants.has(varname)) {
|
||||
error = true;
|
||||
} else if (shader->uniforms.has(varname)) {
|
||||
error = true;
|
||||
} else {
|
||||
if (p_builtin_types.has(varname)) {
|
||||
|
|
Loading…
Reference in a new issue