Implement custom function overloading in shading language

This commit is contained in:
Yuri Rubinsky 2024-05-27 22:16:54 +03:00 committed by Chaosus
parent db66bd35af
commit 1c86feee0a
3 changed files with 259 additions and 143 deletions

View file

@ -355,7 +355,7 @@ void ShaderCompiler::_dump_function_deps(const SL::ShaderNode *p_node, const Str
}
header += " ";
header += _mkid(fnode->name);
header += _mkid(fnode->rname);
header += "(";
for (int i = 0; i < fnode->arguments.size(); i++) {
@ -1190,7 +1190,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
} else if (p_default_actions.renames.has(vnode->name)) {
code += p_default_actions.renames[vnode->name];
} else {
code += _mkid(vnode->name);
code += _mkid(vnode->rname);
}
}