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.
Difference from Detail Textures
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.
A single-layer rock against a three-layer environment material. Drag to compare.
Properties
Usage
- Set Layer Count to the number you actually need; unused layers still cost samples.
- Pick the mask source per layer. Vertex masks are cheapest; texture masks are the most flexible.
- Author masks in 0–1 greyscale; the blender uses them directly as weights.
- 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.
Related
- Detail Textures — single high-frequency overlay.
- Height Gradient — drives layer height masks.
- Vertex Colors — author layer weights per vertex.
- Triplanar Mapping — UV-free layer projection.
Last updated on