Shader: Add Discard node

This commit is contained in:
Jérôme Leclercq
2020-12-30 20:05:16 +01:00
parent a1c15a8c16
commit ed72d668d9
22 changed files with 162 additions and 0 deletions

View File

@@ -111,6 +111,11 @@ namespace Nz
PushStatement(ShaderNodes::DeclareVariable::Build(CloneVariable(node.variable), CloneExpression(node.expression)));
}
void ShaderAstCloner::Visit(ShaderNodes::Discard& /*node*/)
{
PushStatement(ShaderNodes::Discard::Build());
}
void ShaderAstCloner::Visit(ShaderNodes::ExpressionStatement& node)
{
PushStatement(ShaderNodes::ExpressionStatement::Build(CloneExpression(node.expression)));