Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Camera Components with OVRCameraRig

Discussion in 'AR/VR (XR) Discussion' started by Nyarlathothep, Dec 10, 2018.

  1. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    398
    We're currently working to add VR support to our asset Wet Stuff (if that link is dead for you it looks like the store is down right now).

    To use the asset in non-VR mode you just drop a WetStuff component onto the camera gameObject, this adds the necessary command buffers to the camera. After some minor shader changes we've tested VR mode by enabling "XR supported" (Edit > Project Settings > Player > XR Settings > Virtual Reality Supported), this seems to work perfectly.

    However a tester has sent some feedback that it's somewhat broken with the OVRCameraRig, the two main questions he had:
    - Where exactly does the WetStuff component need to be attached?
    - WS component always shows warning about requiring deferred rendering, even when set to it. The effect works even when this warning shows.

    I'm not an experienced VR developer so I have a few followup questions I hope people here can answer:

    1. Our tester found that attaching the WetStuff component to the center camera of the rig works. Is this the correct convention for camera effect components like this (e.g. post processing stack)?

    2. WetStuff requires deferred rendering so we have a check in the inspector which shows a warning if
    camera.renderingPath != RenderingPath.DeferredShading
    , that's what causes the second issue mentioned above. Is the center camera a dummy, so that check is useless, or is something else going on with the rendering path in VR mode?

    3. Is there any point to the OVRCameraRig now that Unity seems to support built in VR cameras? Should we simply not bother supporting the OVRCameraRig in the asset, or is it likely to stay in use for a long time?