Back to Portals... again

I’m revisiting implementing portals (as in the eponymous game), having abandoned my first ill-fated endeavour (Portal-like mirror). :roll_eyes:

I’m now adopting this mask-based approach (Screenspace Co-ords - get and render to - #7 by CarlBateman) with promising results. :slightly_smiling_face:
See below.

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. :thinking:

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.

* 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.

2 Likes