I have created a portal, using a scene capture 2D to a render target. I create a material from this render target and apply it to a plane in my scene. This functions visually as a portal.
I find however that when the player gets very close to the portal as he passes through it, the camera view clips through my plane on which the portal material is applied.
To hide this clipping issue my plan is to create a procedural mesh plane with the 4 verts of the corners located at the world coordinates as outlined in the images below, then apply my portal material to this plane, so the player never sees when they clip the main portal view.
I cannot find any instruction online for how to find the world coordinates of the corners of the players screen (red), or along the edge of the frustrum(green).