Vixen
dd8b0a81
csharp
public readonly record struct MaterialLayerValue

One layer of a layered material.

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

Remarks

⚠ Four scalars, and a layer therefore names no map and no tiling of its own — #1136, which is where doc 48 § M11's "layers carry their own detail tiling" was corrected rather than implemented. TexturedMaterialLayersSurface blends these constants by the splat weights and the only textures it samples are the splat map and, under its permutation, the per-layer height bundle — so a painted surface reads correctly at a distance and has no detail at all up close.

⚠ Which is also why a layer stack cannot be added to a material that already has a base-colour map without taking that map away: this is a base surface and it writes diffuseColor from these numbers. Whatever closes it has to be indexed rather than named — WorldRenderer.Paired keys one static MaterialRenderFeature.TextureIndices entry per map name, off each feature's own default, so N per-layer names would be N entries a material may not choose. TerrainRenderer's layerMaps array and layerScales buffer are the precedent, and LayerCount is already a permutation an array could be sized by.

Fields and properties (4)

  • public Vector3 BaseColor

    Albedo, linear.

  • public float Metalness

    How much of a conductor this layer is.

  • public float Roughness

    Perceptual roughness.

  • public float Weight

    How much of the layer shows, before normalisation — a splat channel.

Methods (1)

  • public MaterialLayerValue(Vector3 BaseColor, float Metalness, float Roughness, float Weight)

    One layer of a layered material.

Used by (13)

  • PaintedLayersTestsThirdPersonShooter.Frame.Tests
  • LayeredMaterialImageTestsVixen.Graphics.Golden.Tests
  • MaterialLayersFeatureVixen.Rendering
  • MaterialSurfaceVixen.Rendering
  • MaterialSurfaceTestsVixen.Rendering.Tests
  • TexturedMaterialLayersFeatureVixen.Rendering
  • TexturedMaterialTestsVixen.Rendering.Tests
  • TypeRegistrationVixen.Rendering
  • Vixen_Rendering_Materials_MaterialLayerValueSerializerVixen.Rendering
  • Vixen_Rendering_Materials_MaterialLayersFeatureSerializerVixen.Rendering
  • Vixen_Rendering_Materials_TexturedMaterialLayersFeatureSerializerVixen.Rendering
  • MaterialSplatTestsVixen.Editor.Assets.Tests
  • SplatBakeDeviceTestsVixen.Editor.Texturing.Tests