I am developing in Unity3D.
Using the Depth Mask shader defined here, objects behind the mask using the shader are not drawn (only objects in front of the mask are drawn). Using the referenced code, I attempted to create a reverse Depth Mask, which is intended to cause the camera to only draw objects behind it.
What I did was change
ZTest LEqual
into
ZTest GEqual
I also tried
ZTest Greater
However, what happens is that the camera draws all objects, be it behind or in front of the mask. How do I implement a reverse depth mask?