Object culling / masking

Hi,

I want to mask a part of the object (make it invisible to my main camera). For example say that I have a plane A and another bigger plane B sits on top of A. I want to make those parts of B that exceeds the limits of A invisible. How is it possible ? (Note that in this scenario camera is looking from top down and B is in front of A in cameras perspective)

I read something about occlusion culling but I dont know how can I use it for this purpose. Any kind of help would be appreciated.

Thank you.

Maybe the DepthMask-shader could do the job?