Search Unity

Bug XRSettings.stereoRenderingMode stuck in 'Multipass' only in Editor

Discussion in 'VR' started by NevinAF, Aug 12, 2021.

  1. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    I'm not sure how I managed this, but the XRSettings.stereoRenderingMode is always set to 'Multipass' while testing VR in the Unity Editor. My XR settings include "OpenVR Loader" and "Oculus" with the following:

    - Oculus PC: Single-pass instanced
    - Oculus Andriod: Multi-Pass
    - OpenVR PC: Single-pass instanced

    Building the application on PC and Andriod returns the respective stereoRenderingMode, however, when running in the unity editor, the settings are always set to MulitPass. This was not the case until recently (as in it ran as expected).

    I know when the application is set to PC in the build settings, the editor uses Single-pass instanced rendering, but the XRSettings value still reads 'Multipass'. I'm using custom screen space rendering and it would be useful to have this value correct while testing different environments.

    I've tried reinstalling the XR package, restarting the Editor in both Andriod and PC build states, and multiple combinations of connecting the headset and opening the editor.

    Any thoughts on how to fix this?
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    In play mode, the editor is using whatever loader is set to be enabled for Standalone build target. That would be where that is coming from depending on what you have enabled for stand alone.
     
    JoeStrout likes this.
  3. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    Yes, I am aware. By checking the XRSettings, I know that the device is loaded from the correct target and device. As stated above, the editor will render as expected ("using whatever loader is set to be enabled for Standalone build target"), BUT the XRSettings value still reads 'Multipass'. The problem isn't necessarily the rendering, but only with the XRSettings.stereoRenderingMode value in the settings.
    I specifically need to know the render mode for specific camera texture manipulation (RenderTextures, Blit, Shaders..).
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    And what loader is being loaded from standalone? It's technically the render passes generated by the display subsystem of the provider that is running that determines that value.
     
  5. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    Interesting, that's good to know. I've had this problem with:
    - Oculus PC: using the Oculus Quest 2
    - OpenVR PC: using the Oculus Quest 2

    Again, this wasn't a problem for a while but eventually got locked.
    I'm working on getting the project tested on another computer as is. I suspect this issue was caused sometime around switching from pc to android back to pc, while doing work between each change.
     
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Can you strip the project down to just oculus using a very simple repro scene?
     
    NevinAF likes this.
  7. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    If the issue persists through environments, I'll do that. If not, I think I'll just have to re-download the entire project to another folder.