I want to make a portal effect in which you can only see objects through another object in blender. I have found out how to do this in cycles, but not in eevee. I am okay if I have to do it in the compositor.
In this picture I show the layout of the scene where I have a monkey inside of two objects, the one on the inside has an emission shader and the one on the outside has a transparent shader.
This picture shows the material for the portal. I want it to be invisible when seen through the outside object.
As you can see it works as intended in cycles. The light path node is making the monkey white when "outside" the portal and black when it is "inside". I need a way to replicate this effect inside of eevee. The transparent depth does not work in eevee. Is there a different way to make the effect in eevee or in the compositor?