is it to be done via shader?
Found it :)
http://www.unifycommunity.com/wiki/index.php?title=DepthMask