Seamless Portals

How can I make this work with a CanvasRenderTarget2D?