How to Prevent Decal Projector from Rendering Through Objects?

Hi everyone,

I’m experiencing an issue with the Decal Projector in URP where it’s projecting through objects, as shown in the image below:

In this example, the projector is rendering on the backside of the wall and the floor. While I understand that I can limit the projection depth to prevent it from exceeding the wall, I’m looking for a solution that also accommodates scenarios where the projected image should be blocked by non-flat surfaces or other objects positioned between the projector and the wall.

Is there a built-in setting for this, or would I need to create a custom shader using Shader Graph to achieve the desired effect? Any guidance would be greatly appreciated!

Thank you!

1 Like