Hey all! When rendering realtime portals, it's important to make sure nothing behind the exit portal gets rendered on the entrance portal, but it's more complicated than it first appears! It's not quite sufficient to set the near clipping distance of the camera - we need to use a bit of maths to calculate an oblique projection matrix with a new clipping plane.
This is part 3 of a series on creating portals in Unity:
1
u/daniel_ilett Dec 18 '19
Hey all! When rendering realtime portals, it's important to make sure nothing behind the exit portal gets rendered on the entrance portal, but it's more complicated than it first appears! It's not quite sufficient to set the near clipping distance of the camera - we need to use a bit of maths to calculate an oblique projection matrix with a new clipping plane.
This is part 3 of a series on creating portals in Unity:
Part 1: Spyro-style Portals: https://danielilett.com/2019-12-11-tut4-1-spyro-skyboxes/
Part 2: Rendering Portals - https://danielilett.com/2019-12-14-tut4-2-portal-rendering/
Part 3: Oblique Matrices: https://danielilett.com/2019-12-18-tut4-3-matrix-matching/
Thanks for reading! 💙