Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  4. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Issues rendering to viewport rects on main display with XR enabled

Discussion in 'AR/VR (XR) Discussion' started by EyePD, Sep 10, 2020.

  1. EyePD

    EyePD

    Joined:
    Feb 26, 2016
    Posts:
    61
    I'm attempting to create an application which can display both in a HMD and also on a 3D monitor in side by side (SBS) mode. My intent is for these to be independent views so simply rendering the VR cameras to textures or using any VR to main display mirroring settings is not an option. Although this is probably a somewhat unusual use case, the problem I'm having seems to be with setting up the viewport rects for the cameras rendering to the main display and is easy to reproduce on a regular 2D monitor. I have a very simple SBS camera rig setup with left and right cameras that have Target Eye set to "None (Main Display)". To get the SBS split screen setup the left camera has a Viewport Rect of X: 0, Y:0, W: 0.5, H: 1 and the right camera has X: 0.5, Y: 0, W: 0.5, H: 1. In this configuration what seems to happen is that once put into play mode the left camera is drawn in both viewports. If if simply turn off XR support in player settings the problem goes away. I've reproduced the issue both with the "Mock HMD Loader" and Windows Mixed Reality plug-ins. If no plug-in providers are selected (i.e. "Initialize XR on Startup" is checked without enabling any plug-ins) the problem also goes away. I've reproduced this in Unity 2020.2.0b2, 2020.1.9f1, 2020.1.3f1 and 2019.4.0f1. To demonstrate the problem I setup the left camera to look at the scene normally but setup the culling mask on the right camera no "Nothing" and set the background color to a dark blue. This makes it very obvious that the side by side viewports are configured correctly (see first image). After starting the application with XR enabled, the left view is shown on both sides (see second image). I've attached a test scene with this configuration.

    before run.PNG during run.PNG
     

    Attached Files:

    • sbs.zip
      File size:
      3.1 KB
      Views:
      33
    Last edited: Nov 2, 2020
  2. EyePD

    EyePD

    Joined:
    Feb 26, 2016
    Posts:
    61
    This was confirmed as a bug and is now opened in the Issue Tracker as issue ID 788105.
     
unityunity