More than backface culling

Hello,

We are trying in an augmented reality project to hide what should be beneath ground. You can see screenshot illustrating the issue. Logic is pretty simple, if a raycast from camera hits the floor outside the pool before the rendered mesh, it should not be visible.
We already use backface culling but as you can see on the screenshot, this is not enough.

Is there anyway (code, shader, etc.) to do this ? We would maybe need some kind of plane surronding the pool with a “magic shader” which simply does not render anything (not transparent, not opaque too). Or some code with raycasting but not sure we can deactivate only parts of a mesh render.

Hope the issue is understandable and a solution exists somewhere.

Regards,

Is it possible to place a skirting mesh around the bottom that is the same colour as the background? That would hide it for you.

http://forum.unity3d.com/threads/122873-Invisible-Depth-Mask

This?

I found it through searching Google. I had never considered this before, so I was quite interested. If this isn’t perfect, and you find something better, be sure to post back here and let the rest of us know about it!

Edit: Pretty sure this isn’t what you want, but it was similar and others might enjoy it. http://forum.unity3d.com/threads/11832-Shader-for-Clipping-plane

Exactly what we need, works great!
thanks wccrawford!