Invisible wall blocking rendering in a area.

I’m working in a 2d game and need a way to place a invisible plane covering part of the screen,that made all objects in a certain layer invisible,appearing when leaving the area behind the plane.

Just use the DepthMask shader.