I'm trying to follow This tutorial for a portal mask shader. It's an awesome effect but it comes with a couple of caveats. The shader as he designs it can only exist in a bubble, as:
As loading can't be perfectly instantaneous, this means when a player enters the portal, there will be a brief moment in which they are right back outside it, which I feel ruins immersion.
In order to compensate for this, I figured I would try to extrude the edges of the mask geometry, which works for the inside of the portal..
..but introduces the new problem of the front faces of the inside of the object being visible:
So what I'm hoping to achieve is a shader which:
- Occludes the PortalMask shader/object from the outside only
- Does not occlude other environment objects
- Is not itself visible
Am I asking the impossible?