3 using System.Collections.Generic;
5 using SiliconStudio.Assets.Compiler;
6 using SiliconStudio.BuildEngine;
7 using SiliconStudio.Paradox.Assets.Effect.Generators;
8 using SiliconStudio.Paradox.Effects;
9 using SiliconStudio.Paradox.Shaders.Compiler;
11 namespace SiliconStudio.
Paradox.Assets.Effect
23 CompilerParametersGenerators.AddRange(compilerParametersGenerators);
35 return "PermutationGeneratorBuildStep";
40 if (keyIndex >= parameterKeys.Count)
42 yield
return parameters.Clone();
46 var keyValues = parameterKeys[keyIndex];
48 parameters = parameters.Clone();
49 foreach (var value
in keyValues.Value)
51 parameters.SetObject(keyValues.Key, value);
52 foreach (var returnParameters
in GenerateKeysPermutation(parameters, parameterKeys, keyIndex + 1))
54 yield
return returnParameters;
Key of an effect parameter.
A BuildStep that can spawn multiple BuildStep. Input and output tracking and merging will be performe...
Parameters used for compilation.
override BuildStep Clone()
Clone this Build Step.
override string ToString()
The context used when compiling an asset in a Package.
readonly List< ICompilerParametersGenerator > CompilerParametersGenerators
PermutationGeneratorBuildStep(AssetCompilerContext context, List< ICompilerParametersGenerator > compilerParametersGenerators)
IEnumerable< CompilerParameters > GenerateKeysPermutation(CompilerParameters parameters, IList< KeyValuePair< ParameterKey, List< object >>> parameterKeys, int keyIndex=0)
readonly AssetCompilerContext Context
The default implementation for ICompilerParametersGenerator simply copy a clone version of the input ...