Enables passing out built-in parameter from parent function in shaders

(cherry picked from commit 7a2c6a8c0e)
This commit is contained in:
Yuri Roubinsky 2020-02-22 11:09:06 +03:00 committed by Rémi Verschelde
parent b9b53966a3
commit 4dd1eee769

View file

@ -2167,6 +2167,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;
}