Skip to Content
DocumentationFeaturesLayer Textures

Layer Textures

Layer Textures stacks up to four full albedo and normal sets on a single material and blends them with masks. It is the right tool for environment art that mixes moss, dirt, snow, and paint over a base, without spawning a separate decal or splat shader.

When to use it

  • Environment rocks and props with moss, dirt, or snow.
  • Painted props where the paint is masked separately from the wear.
  • Stylized vehicles with rust, decals, and base paint as distinct layers.
  • Hero items where each layer has its own normal frequency.

Modes

  • Vertex-mask blending — each layer’s weight comes from a vertex color channel (R, G, B, A), authored in Blender, Maya, or Polybrush.
  • Texture-mask blending — a packed RGBA mask drives all four layer weights from a single texture sample.
  • Height-driven blending — each layer compares against a world-Y range. Pairs with Height Gradient for snow caps and waterlines.

Plain rock texture with no variation.

Moss masked into crevices via vertex green, snow blended in above Y=2.

Base only
Base + moss + snow

A single-layer rock against a three-layer environment material. Drag to compare.

Properties

Inspector labelShader propertyTypeDefaultDescription
Layer Count_LayerCountInt (1–4)2Active layers. More layers cost more texture samples.
Layer 1 Albedo_Layer1AlbedoTexture2DwhiteLayer 1 albedo map.
Layer 1 Normal_Layer1NormalTexture2DbumpLayer 1 normal map.
Layer 1 Tiling_Layer1TilingVector4(1,1,0,0)Per-layer tiling (xy) and offset (zw).
Layer 1 Mask Source_Layer1MaskEnumVertexRSource of the layer weight: vertex, texture, or height.
Blend Mode_LayerBlendModeEnumMixMix, Multiply, or Overlay across layers.
Height Blend_LayerHeightBlendFloat (0–1)0.0Adds heightmap-based blending sharpness.

Usage

  1. Set Layer Count to the number you actually need; unused layers still cost samples.
  2. Pick the mask source per layer. Vertex masks are cheapest; texture masks are the most flexible.
  3. Author masks in 0–1 greyscale; the blender uses them directly as weights.
  4. For snow on rocks, set Layer 2’s mask source to Height and feed it a Y range.
material.SetInt("_LayerCount", 3); material.SetTexture("_Layer2Albedo", mossAlbedo); material.SetFloat("_LayerHeightBlend", 0.4f);

Tips & gotchas

  • Each layer is two texture samples (albedo plus normal), so four layers is eight samples before any other feature — budget carefully on mobile.
  • Vertex masks lose precision at low poly counts; high-poly meshes paint cleanly, low-poly ones tile sharply.
  • Height blend needs a Height Blend above 0 for contrast; at 0, layers cross-fade linearly.
  • Pairs with Triplanar, whose UVs can drive each layer for UV-free terrain.
Last updated on