public sealed class EffectBundleBuilderBuild-time pre-generation: the third tier, produced.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two ways in, because the question "which variants does this project need" has two honest answers and neither one alone is enough. Add takes the set a run actually asked for — the exact answer, available only after somebody plays the game. AddClosure takes a shader and produces every variant it has — the complete answer, available before anybody plays it, at the cost of compiling variants nothing will ever draw.
A project uses both: closures for the handful of shaders every frame goes through, a manifest for the long tail. What comes out is one EffectBundle either way, and a shipping build that loads it and nothing else cannot compile a shader.
A key that will not compile fails the build here. The alternative is a bundle missing an entry, which is a miss at run time — on a device, in a level, weeks later, presenting as an object that does not draw.
Fields and properties (3)
public RavenEffectCompiler CompilerWhat compiles the variants.
public int CountHow many distinct variants have been compiled.
public ImmutableArray<EffectKey> MissingKeys that were asked for and that no shader answered.
Methods (6)
public EffectBundleBuilder(RavenEffectCompiler compiler)Build-time pre-generation: the third tier, produced.
public void Add(EffectManifest manifest)Compiles everything a manifest names.
public void Add(IEnumerable<EffectKey> keys)Compiles a set of keys.
public PermutationClosureResult AddClosure(string shaderName, ShaderComposition composition = default(ShaderComposition), IReadOnlyDictionary<string, IReadOnlyList<string>>? domains = null)Compiles every variant one shader has.
public EffectBundle Build()The bundle, ordered so two builds of one set produce one file.
public void Write(string path)Writes the bundle where a content build will pick it up.
Used by (3)
- EffectCompilerTestsVixen.ShaderCompiler.Tests
- ShaderBuildRunnerVixen.Cli
- ZeroRuntimeCompilationTestsVixen.ShaderCompiler.Tests