Enables passing out built-in parameter from parent function in shaders
This commit is contained in:
parent
f65781fe7f
commit
7a2c6a8c0e
|
@ -2198,6 +2198,14 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p
|
||||||
valid = true;
|
valid = true;
|
||||||
break;
|
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;
|
b = b->parent_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue