How to use Unity Universal Rendering Pipeline (URP) to implement see through Objects


First we need to create new layer for Player ( also apply to child objects)

Step 1: Create material that will use to render when player is behind some things


Example I create simple Fresnel effect and multiply with color 

Step2: In URP Renderer Data(URD), add 2 Renderer Feature, select Render Objects

1. Render Object: 

Layer Mask: Player

Override Mode: Material

Select Material created before

Enable Depth and set Depth test : Greater

This pass will only render when the distance to the pixel is greater than value stored in the depth buffer

2. Render Object

Layer Mask: Player

* if we don't add second Render Object player only show up if it's behind something.

Final URD will look like this


Leave a comment

Log in with itch.io to leave a comment.