Recursive Rendering

In the scenes folder there is a scene named Recursive Rendering that showcases the following functional upgrades to this package:

  • Recursive rendering

  • Optimized portal screen rendering

During runtime, you can open the Scene view alongside the Game view to better observe the optimization in action:

  • Portal screens that are not visible to the player’s camera remain black until the player looks at them.

  • Once the screen becomes visible, it begins rendering.

  • When the player leaves and the portal screen is no longer in view, rendering stops again.

This system ensures that only the necessary portal views are rendered at any time, which drastically improves performance, especially in scenes with multiple portals.

If you select a portal in the Hierarchy, you’ll notice that it no longer uses the Portal.cs script. Instead, Pro portals use the new PortalPro.cs script, which includes additional features and performance improvements.

Recursion Limit

This property defines the maximum recursion depth to be rendered — in other words, how many times the portal view should be recursively drawn.

Recursion limit 1 on the left, 2 in the middle and 4 on the right

in the prefab folder of the pro extension, you’ll find two Pro portal prefabs:

  • PortalPro

    • Identical in appearance to the standard version, but with the new PortalPro script attached.

  • PortalPro (Gate)

    • A new 3D model included in the Pro package, also using the PortalPro script.

  • All other portal prefabs are still based on the standard Portal.cs script, but are easily replaceable with the PortalsPro script

Last updated