Mask object within cube/mesh

Hey guys.

I’m trying to figure out how to have things that enter a certain mesh to not draw. This mesh needs some sort of shader that makes it invisible while also not drawing anything within it. I’m not sure if it’s quite a depth masking thing or not… I tried using a depth mask shader but it doesn’t draw anything that is within it but also anything behind it too, which is not my desire effect. I’d be interested in not drawing only things within it.

So for example, if I had an invisible rectangle that I use to cover half of a house, the house should not be drawn where the cube is (but drawn on the other side).

Can anybody point me in the right direction or provide a shader that does this?

Specifically, the case I’d want to use it is when entering an interior. I want the roof and about 80% of the walls to be invisible while drawing the floor and just a bit of the walls from the bottom up.

Thanks everyone

If this is what you are looking for the answer is here.