Depthmask shader not working on Unity3

I just noticed the Depthmask shader on the wiki http://www.unifycommunity.com/wiki/index.php?title=DepthMask is not working on Unity3.

Anyone know what changed from 2x to 3x that broke this?

Maybe I can try to fix it, but I need to know why it broke.

I can confirm this too. I was testing out forestjohson’s Hollow Mountain example and it does not work.

http://forum.unity3d.com/threads/7791-Hollowed-Mountain

Same here. Tried both those examples. What happens is that the Mask is not rendered at all and the MaskedDiffuse is rendered just like a normal Diffuse. This is Unity 3.0.0f5 (51258) for the mac. Free version! No errors or warnings appear (also not inside the shader files).

Edit 1: there’s another thread about this subject atm: http://forum.unity3d.com/threads/55234-depht-mask-shader-from-wiki-not-working-in-unity-3?highlight=Depthmask

Edit 2: ok solved it partially…
The mask shader simply says “Colormask 0”
The masked shaders say “Tags {Queue = Overlay}”
I think it went wrong with the UsePass stuff, but I don’t know much about shaders yet.
I attached my working example. It doesn’t apply to a terrain yet and, more importantly, the mask doesn’t allow light to pass through.

406104–14002–$MaskedPlanes.unitypackage (1.68 MB)

The concept of “Overlay” doesn’t work at all for me…
The worst is that the Mask cuts others things like the map, but not what i want…

If someone has another solution for that, i would be happy :smile: ! Else how can i get Unity 2.6 back ?

I just posted my workaround in the other thread: http://forum.unity3d.com/threads/55234-depht-mask-shader-from-wiki-not-working-in-unity-3?p=458597&viewfull=1#post458597