Hide Objects behind Specific Plane I am trying to find ways to hide objects behind specific planes.

That is a &quot;tv&quot; with a cube behind it, I already have it so when you look at it front on, the back disappears.

However the effect is that of &quot;Non-Euclidean geometry&quot; so the blue cube shouldn't be seen outside of the tv, but if I add another transparent cube/plane and apply the same shader to the cube, its not going to work.

It is going to block off both the cube and the back of the tv, and now the cube doesn't show head on.

My question is, is it able to do it based on groups or plane id's? I know the shader is using directly the transparency values. but just not sure how else to do it.
These are the shaders:

(Transparent Plane/Cube)

The tv back, and the blue cube (obviously blue color for cube)
Sincerely, Nota
I went to recycling this answer and after simplifying I end up with the same node tree, that seems to me is working. So I guess I missed something ... so if you can explain missing part closer.