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

When starting the scene you canopen the scene view next to the game view to see the optimized screen rendering effect. All portal screens that are not visible by the player camera will remain black until the player sees them for the first time, then the screens will start to render. When the player leaves the portal and the screen is not visible anymore, the portal screen will stop rendering. This will drastically improve performance when using multiple portals within the same scene, since only the stuff is rendered that is really needed.

When you click on a portal in the scene hierarchy, you will see that the portals are not using the Portal.cs script anymore. Instead now the PortalPro.cs script is used, which has an additional property called “Recursion Limit”.

With this property you can specify the max recursion depth to be rendered (how often you want the screen to be rendered). Here you have an example with a recursion limit of 1, 2 and 4:

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

in the prefab folder of the pro extension you have 2 pro portals included:

  • PortalPro

    • same portal as in the standard version, just with the new PortalPro script

  • PortalPro (Gate)

    • One of the new 3D models with the PortalPro script attached

  • All other Portal prefabs are based on the standard Portal script but but should be easily replaceable with the PortalsPro script

Last updated