Search Unity

[RELEASED] Portals for VR

Discussion in 'Assets and Asset Store' started by TomGoethals, Oct 1, 2022.

  1. TomGoethals

    TomGoethals

    Joined:
    Jan 29, 2022
    Posts:
    48
    Hi,

    I've spent the better part of my holidays and free time creating and optimizing a set of shaders and scripts to get Portals working in VR. Optimized in a way that it can run smoothly on Oculus Quest 2.

    It's built for URP and Single Pass Multiview VR compatible.
    Portals can be traversed without a single glitch in VR through walls.

    Fully working scene preview, easily modify the Shadergraph materials.

    Shaders supports animated transparency and animated refraction for some really cool effects.

    Alpha maps baked into your albedo textures can be used to open up the textured portals as you walk towards them.

    Portals are recursive, meaning you can see a portal through another portal through another portal and so on.

    Lots of care and attention has been given for portals to be seamless in VR, standing in the center of a portal with 1 eye on the left side and the other on the right works perfectly even with large near clipping values on your camera.

    Portals can be completely flat planes occupying the same space as a wall and still have no clipping issues.

    Many options to tweak performance. Change the resolution, modify the layermask, limit AA and Blend gradually to a static color over a set distance.

    Includes a system for objects to traverse through the portals, tested with VRIF and easy to integrate with other Interaction frameworks and character controllers.

    The video shows some assets (like the hands) from the excellent VR interaction framework asset. These are not included. However a simple VR demo cameraController and portalgun example is included to get you started.

    Currently tested in VR on:
    • Oculus (Meta) Quest 1 and 2 (Desktop and on-device)
    • Valve Index / Vive - SteamVR
    • Oculus XR set to Multiview
    • OpenXR set to SinglePass Instanced
    For a detailed compatibility list and instructions please read the documentation (see link below)

    Documentation here
    Youtube channel with demo material
    An example APK for Quest 2

     

    Attached Files:

    LucasHehir likes this.
  2. Kareeem

    Kareeem

    Joined:
    Mar 1, 2013
    Posts:
    37
    Does this support Single Pass Instanced in VR? I am looking for a shader that can handle refractions in SPI.
     
  3. Kareeem

    Kareeem

    Joined:
    Mar 1, 2013
    Posts:
    37
    Oh I see this is not compatible with the built in render pipeline.