How to do it...

There are two things that we'll be using in this recipe: the standard Deferred Decals and the new ones, known as Mesh Decals. The first type will work straight out of the box, but depending on which version of Unreal you are using, you might need to head over to the Project Settings and adjust a certain checkbox in order to use the latter type. Please also keep in mind that mesh decals are only available on version 4.13 or later, so don't try using an earlier version of the engine! Let's get started:

  1. Head over to Edit | Project Settings and look for the BDBuffer Decals checkbox within the Rendering | Lighting category. Make sure that the box is ticked – it may be already, depending on your version of Unreal:

With that out ...

Get Unreal Engine 4 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.