ShaderNode fixes

This commit is contained in:
Jérôme Leclercq
2021-04-17 14:44:24 +02:00
parent 3a7f5c2630
commit e7a9fd95ea
3 changed files with 8 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ Nz::ShaderAst::NodePtr CastVec<ToComponentCount>::BuildNode(Nz::ShaderAst::Expre
std::size_t overflowComponentCount = ToComponentCount - fromComponentCount;
std::vector<Nz::ShaderAst::ExpressionPtr> params;
params.emplace_back(std::move(params[0]));
params.emplace_back(std::move(expressions[0]));
for (std::size_t i = 0; i < overflowComponentCount; ++i)
params.emplace_back(Nz::ShaderBuilder::Constant(m_overflowComponents[i]));

View File

@@ -21,7 +21,7 @@ Nz::ShaderAst::NodePtr PositionOutputValue::BuildNode(Nz::ShaderAst::ExpressionP
assert(count == 1);
assert(outputIndex == 0);
auto output = Nz::ShaderBuilder::AccessMember(Nz::ShaderBuilder::Identifier("OutputData"), { "position" });
auto output = Nz::ShaderBuilder::AccessMember(Nz::ShaderBuilder::Identifier("output"), { "position" });
return ShaderBuilder::Assign(ShaderAst::AssignType::Simple, std::move(output), std::move(expressions[0]));
}