Layering Materials In Unity

Using the HDRP Layered Lit Shader

Another great way to add detail to our materials in Unity’s High Definition Rendering Pipeline (HDRP), is by using Layered Shaders.

The Layered Lit Shader allows us to stack up to four Lit materials to create blends, allowing for an easy method of realism. The Main Layer acts as a normal Lit Material in that it can control the likes of the albedo, normal, and height maps. From here, we can layer our other materials on top.

Using our cobblestone we created previously for our displacement examples, lets layer this with a dirt texture. Since we want to use our cobblestone material as the main layer, we actually need to create a new material to handle the Layered element. Creating a new material and selecting the appropriate shader, results in a window looking like the following.

Placing in our two materials, will now result with Layer 1 being over top of the Main layer. To start blending them, we need to apply a Layer Mask, this could be our Height Map from our Main layer, or we could make a copy and edit it to have more contrast. Either way, we can now start adjusting different map settings for each material to find a blend we like.

Of course, for extra added effect, we can apply Tessellation using a LayeredLitTessellation shader. Ultimately, we can very easily make various different blends using only a select few materials!

Our two separate materials, next to the two layered

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Basic How did I create a working app within 3 days? with no previous experience

Dear Diary, Crud my life#308

Linked list as a convenient helping-hand for CI/CD workflows

How This Software Testing Principle Applies In Our Real Life Too

How I developed my first web app, or how I had almost forgotten how much fun coding was.

Finding a job after a coding bootcamp — Personal profiles

Language Evaluation Criteria — Writability and Reliability

Octopus — Visualize Targets, roles and environments.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Calum Slee

Calum Slee

More from Medium

Screen Space Reflections In Unity

Physics 101 — Simulating Physics in Unity

Loading Scenes in Unity

Adding Scene to Build Settings

Draggable UI In Unity