Using Layered Lit to mix Texture Maps

Renato Figueiredo
2 min readMar 7, 2024

--

Objective: Learn Layered Lit works in Unity.

What is Layered Lit ? It is a shader in Unity, that allows us to blend materials, to create more realistic and complex texture maps. It stacks multiple layers of textures and effects, such as base color, metallic, smoothness, normal maps, emission, and more, to achieve intricate and detailed surface appearances.

Example of a Layered Lit material.

In this example, I simply downloaded Grass 01 from Filebase, and mixed with Stone 04.

Cobblestone material in our Scene.

In this example, my Layer Mask is simply the Height Map from our Stone 04, having its levels adjusted a bit in Photoshop.

Adjusting our Height Map to use it as our Layer Mask.

Now we can simply add to our Cobblestone material as our Layer Mask, and see how the textures work as combined.

Adjusting our Cobblestone Material in the Inspector.

Now as we can see, our textures are blended, changing how our terrain looks. This is great for advanced lighting features, as you can add decals, detail maps to create complex material interactions.
As most things, since this offers advanced features and customization options, we have to be mindful of performance, as using complex materials setups can negatively impact the performance of our game.
Overall, Layered Lit shader is a versatile and flexible shader solution for creating realistic and visually stunning materials with complex surface properties and lighting effects.

--

--