Shader/Modules: proof of concept

This commit is contained in:
Jérôme Leclercq
2022-03-05 04:07:18 +01:00
parent 7dab1d735f
commit 43ac86e85c
29 changed files with 667 additions and 192 deletions

View File

@@ -819,10 +819,9 @@ std::unique_ptr<Nz::ShaderAst::DeclareFunctionStatement> ShaderGraph::ToFunction
std::vector<Nz::ShaderAst::DeclareFunctionStatement::Parameter> parameters;
if (!m_inputs.empty())
{
parameters.push_back({
"input",
Nz::ShaderAst::ExpressionPtr{ Nz::ShaderBuilder::Identifier("InputData") }
});
auto& parameter = parameters.emplace_back();
parameter.name = "input";
parameter.type = Nz::ShaderAst::ExpressionPtr{ Nz::ShaderBuilder::Identifier("InputData") };
}
Nz::ShaderAst::ExpressionPtr returnType;