Mixing Texture Maps with LayeredLit Shader in Unity’s HDRP
The LayeredLit and LayeredLitTessellation are very powerful tools to get very creative quite easily by mixing up to four different materials. The main difference between these two, is how the latter can be tessellated to achieve great 3D effects with texture elevation and depth.
To do this, create a new material and selects its shader type to HDRP > LayeredLitTessellation. Then, under Layer List, input both materials that will be mixed.
Under Surface Inputs, Layer Mask defines in Black and White how the materials will be mixed. I will use this texture to create this ornament pattern follow the stones and grass fill up the background.
With all these material and layer set ups, applying the newly created “Dual mat” (Layered Lit) should look like this:
To add some bumps to this surface, and even make it more impressive by following the same pattern lifting the stones up, first change the shader type to LayeredLit Tessellation and we also need an invert image of the Layer Mask to correctly set up the Height Map of the Main Layer:
Then adjust the layer’s parameters as such:
Main Layer values:
Second Layer:
And finally set the Tessellation Factor higher to create a well-defined pattern given through the Height Map:
Playing with Tessellation Factor:
And tweaking again the amplitude defines the height of the stone texture:
This shader type is very unique to the HDRP pipeline and has a great amount of variations to give. Another great examples of how textures can be mixed are some of these patterns:
or even a more ordered one: