Shader: Add support for for-each statements and improve arrays

This commit is contained in:
Jérôme Leclercq
2022-01-02 22:02:11 +01:00
parent aac6e38da2
commit 4fe44339c5
30 changed files with 712 additions and 93 deletions

View File

@@ -487,7 +487,9 @@ namespace Nz
{
ShaderAst::SanitizeVisitor::Options options;
options.optionValues = states.optionValues;
options.reduceLoopsToWhile = true;
options.removeCompoundAssignments = true;
options.removeOptionDeclaration = true;
options.splitMultipleBranches = true;
sanitizedAst = ShaderAst::Sanitize(shader, options);