Using Decals in Unity- Game Dev Series 161

S.J. Jason Liu
3 min readMay 20, 2022

Objective: using decal material into game scene.

When you try to create some special mark (such as blood splash, water stain, etc.) you might create a small texture on object. However HDRP provides a better solution to cover a texture called decal on objects, which will present a better, realistic effect than you could imagine. Even on tessellation texture, would perfectly fit.

Create decal

Decal is a material that you can create one by changing the type of shader from a material.
Let’s use this texture to demonstrate how to create a decal material.

First, create a material and change the shader to HDRP> Decal.

With decal material, we would need to import some needed texture.

Then the decal material is ready. Let’s use it into our game scene.

Decal projector

From Hierarchy, create a decal projector from Rendering> Decal Projector.

This would create a cube shape object. Move it to a proper position that slight above the object we would like to present the effect.

You can adjust the size from Inspector.

Then we can assign the decal material we just created into decal projector.

You should see the result immediately on your scene view.

Take a closer look and you would realize it is not just a material that floating above the surface, but a paper-like texture patched on surface.
Move it horizontally and you would be surprised by its effect.

Such a powerful visual effect tool from HDRP could be used to create a more realistic game scene.

--

--

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.