Vixen
02b45cc4
csharp
public static class MaterialKeys

The permutation keys the material model sets.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A material sets a permutation's value; whether it reaches the effect key is the host's, through PermutationKeys — a key the shader does not branch on must not be in the key, or the cache splits for variants that compile to the same bytes. So a host that draws layered materials adds LayerCount to the list it registers for that pass.

Per shader rather than one shared key, because that is how every other key in the engine is named: the generator emits ForwardPlus.MaxLights from ForwardPlus's own reflection, and a key that did not match it would be a second name for one uniform.

Fields and properties (1)

  • public const int DefaultLayerCount

    The default MaterialLayersSurface declares.

Methods (1)

  • public static PermutationKey<int> LayerCount(string shaderName)

    How many layers a layered material blends, for one shading pass.

Used by (2)

  • MaterialCompilerTestsVixen.Rendering.Tests
  • MaterialLayersFeatureVixen.Rendering