Using Layered Lit to mix Texture Maps

Andrea Alicino
2 min readSep 26, 2022

--

The goal of the day is to discover another useful function with HDRP. Let’s talk about Layered Lit. That is, creating a material that is the union of multiple materials.

The Layered Lit Shader allows you to stack up to four Materials on the same GameObject in the High Definition Render Pipeline (HDRP). The Materials that it uses for each layer are HDRP Lit Materials. This makes it easy to create realistic and diverse Materials in HDRP. The Main Layer is the undermost layer and can influence upper layers with albedo, normals, and height. HDRP renders Layer 1, Layer 2, and Layer 3 in that order on top of the Main Layer.

So let’s start right away by creating new material and setting the shader type to LayeredLit.

In the settings in Inspector, we can immediately notice the “Layer Counts” field.

In this example, we will use two materials but it is possible to go up to 4 layers.

Let’s go select our materials and enter them in the layer list.

Currently, there are no changes in fact you will only see one of the two materials, this is because we need a mask for the other layers that are added.

To create a Layer Mask you need software like photoshop or gimp. If you have a HeightMap you can start from that by editing the layers and darkening them.

now you need to add the texture as a layer mask and you should see both materials.

See you in the next article 🚀

--

--

Andrea Alicino

Game Developer Unreal Engine/Unity. Computer science graduate. Seeking new opportunities.