DepthMask-Unity-Shader icon indicating copy to clipboard operation
DepthMask-Unity-Shader copied to clipboard

Simple but powerful Unity shader that enables geometry masking for cutouts, UI, AR, and multiple camera VFX tricks.

Unity Depth Mask Shader

This simple shader attached to a material is incredibly useful in @unity3d. Anything behind a mesh with it applied will be rendered invisible to your camera.

Combine with multiple cameras for cool masking tricks. Useful for creating fake holes in geometry, UI and AR applications.

Getting Started

Download the shader and put it in your project's Assets/shaders directory. Make a material in Unity and set its shader to DepthMask, and experiment.

Good luck!

@Doomlaser