# Back to Portals... again

**URL:** <https://forum.playcanvas.com/t/back-to-portals-again/30748>\
**Category:** Random Chat\
**Created:** [April 23, 2023, 5:37pm UTC](https://forum.playcanvas.com/t/back-to-portals-again/30748 "2023-04-23T17:37:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlBateman](https://forum.playcanvas.com/letter_avatar_proxy/v4/letter/c/46a35a/32.png) [@CarlBateman](https://forum.playcanvas.com/u/CarlBateman)\
**Post date:** [April 23, 2023, 5:37pm UTC](https://forum.playcanvas.com/t/back-to-portals-again/30748/1 "2023-04-23T17:37:31Z")

</div>

I’m revisiting implementing portals (as in the eponymous game), having abandoned my first ill-fated endeavour ([Portal-like mirror](https://forum.playcanvas.com/t/portal-like-mirror/23894)). 🙄

I’m now adopting this mask-based approach ([Screenspace Co-ords - get and render to - #7 by CarlBateman](https://forum.playcanvas.com/t/screenspace-co-ords-get-and-render-to/24095/7)) with promising results. 🙂  
See below.

 ![mask-based-portals](https://forum-files-playcanvas-com.s3.dualstack.eu-west-1.amazonaws.com/original/3X/5/e/5ef4b1294cd0fa32b41b6fea367628938bb5c696.png)

Top left is the mask, top right is the view from the portal camera, main image is the result of merging with the main camera…

I think that the white edge is a result of a resolution mismatch between the render texture and screen sizes. 🤔

This time was distinctly less arduous than previously\*, despite having to tackle several deprecation warnings and writing a post process shader with the limited documentation for help.

\*&nbsp;I don’t know whether that’s because I’m getting better at this graphics thing, I’m getting used to PlayCanvas, PlayCanvas is getting easier or something else ¯\_ (ツ)\_/¯.

Next steps: fix the sizing issue, player movement, portal camera tracking, clipping, use a more interesting scene.
