Merge pull request #37040 from Chaosus/shader_out

Enables passing out built-in parameter from parent function in shaders
This commit is contained in:
Yuri Roubinsky 2020-03-14 11:42:45 +03:00 committed by GitHub
commit 750d7ea359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2198,6 +2198,14 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p
valid = true;
break;
}
if (b->parent_function) {
for (int i = 0; i < b->parent_function->arguments.size(); i++) {
if (b->parent_function->arguments[i].name == var_name) {
valid = true;
break;
}
}
}
b = b->parent_block;
}