Quick answer: Each splatmap stores 4 terrain layers in its RGBA channels. Layers 5+ require an additional splatmap and a second rendering pass. In URP, enable additional passes in the terrain shader settings and ensure shader variants are not stripped. In Built-in, it works automatically up to 16 layers but each group of 4 costs a full extra draw pass.

Here is how to fix Unity terrain paint texture splatmap limits. You add a fifth terrain layer, paint with it, and nothing appears. The texture slot shows correctly in the Terrain inspector, the layer previews fine in the paint brush list, but painting produces no visible change on the terrain surface. Layers 1 through 4 work perfectly. Layer 5 and beyond are invisible.

The Symptom

After adding a fifth (or ninth, or thirteenth) terrain layer, painting with that layer produces no visible result on the terrain. The alphamap data is being written — you can verify via TerrainData.GetAlphamaps() — but the terrain shader does not render the additional layers. In URP, the terrain may appear black where only the invisible layer has weight.

In the Built-in pipeline, this typically works automatically up to 16 layers. The issue is most common in URP and HDRP where shader variants may be stripped or additional passes must be explicitly enabled.

What Causes This

Splatmap RGBA channel limit. Each splatmap texture is an RGBA texture where each channel stores the blend weight for one terrain layer. Four channels means four layers per splatmap. Layer 5 needs a second splatmap, layer 9 needs a third, and so on.

URP terrain shader layer cap. The URP Terrain Lit shader defaults to a maximum of 4 layers in its base pass. Rendering layers 5–8 requires the shader to perform an additional blending pass. If the _TERRAIN_BLEND_HEIGHT or additional pass keywords are missing, those layers are not sampled.

Shader variant stripping. If you have aggressive shader stripping in your build settings or a custom IPreprocessShaders implementation, the multi-pass terrain variants may be stripped, making them unavailable at runtime even though they work in the editor.

Material override without multi-layer support. If you assigned a custom material to the terrain that only samples the first splatmap, additional splatmaps are ignored entirely.

The Fix

Step 1: Check URP terrain settings. Select your URP Renderer Asset and verify that the terrain settings allow additional passes. In the Universal Renderer Data, look for the terrain rendering configuration.

// Verify terrain alphamap count at runtime
TerrainData td = terrain.terrainData;
Debug.Log("Splatmap count: " + td.alphamapTextureCount);
Debug.Log("Layer count: " + td.terrainLayers.Length);

// If alphamapTextureCount is 1 but layers > 4, the extra splatmap is missing

Step 2: Ensure the terrain material supports multiple passes. For URP, the terrain must use the Universal Render Pipeline/Terrain/Lit shader. Check the material on the Terrain component — if it says “Custom” or uses a non-standard shader, additional layers may not render.

// Force terrain to use the default URP terrain material
Terrain terrain = GetComponent<Terrain>();
terrain.materialTemplate = null; // Resets to default pipeline material

Step 3: Prevent shader variant stripping. In Project Settings > Graphics, add the terrain multi-pass shader variants to the “Always Included Shaders” list, or add a ShaderVariantCollection that includes the terrain keywords for additional passes.

Step 4: Consider the performance cost. Each additional group of 4 layers doubles the terrain rendering cost for those patches. On mobile, keep layers to 4 or fewer. On desktop, 8 layers is usually fine but 12+ can become expensive on large terrains.

// Runtime layer count check for mobile builds
void ValidateTerrainLayers(TerrainData data)
{
    int maxLayers = 4;
    #if !UNITY_ANDROID && !UNITY_IOS
    maxLayers = 8;
    #endif

    if (data.terrainLayers.Length > maxLayers)
        Debug.LogWarning("Terrain exceeds recommended layer count for this platform");
}

Alternative: Texture Arrays

For terrains needing many layers without the multi-pass cost, custom terrain shaders using Texture2DArray can sample all layers in a single pass. This requires a custom shader that indexes into the array using the splatmap weights, but avoids the per-4-layer pass overhead. Several Asset Store solutions implement this approach.

“Four layers per splatmap is not a bug — it is RGBA. If you need a fifth, you need a second texture and a second pass to read it.”

Verifying the Fix

After applying the correct material and verifying shader variants, repaint with layer 5. The texture should now appear. Check TerrainData.alphamapTextureCount at runtime to confirm multiple splatmaps are allocated. In the Frame Debugger, you should see two terrain draw calls for patches that use layers from both splatmaps.

Terrain rendering is one of the few places where Unity still uses multi-pass by default. Each splatmap group costs a full pass — budget accordingly.