ShaderAst: Add NoOp node

This commit is contained in:
Jérôme Leclercq
2021-01-14 21:58:06 +01:00
parent a9f2e05b57
commit acb998f67e
17 changed files with 70 additions and 1 deletions

View File

@@ -574,6 +574,11 @@ namespace Nz
Append(var.name);
}
void GlslWriter::Visit(ShaderNodes::NoOp& /*node*/)
{
/* nothing to do */
}
void GlslWriter::Visit(ShaderNodes::ParameterVariable& var)
{
Append(var.name);
@@ -598,7 +603,7 @@ namespace Nz
bool first = true;
for (const ShaderNodes::StatementPtr& statement : node.statements)
{
if (!first)
if (!first && statement->GetType() != ShaderNodes::NodeType::NoOp)
AppendLine();
Visit(statement);