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

Attaching a PostProcessing layer to XR Origin Camera breaks it

Discussion in 'General Graphics' started by nxshuks, Aug 10, 2022.

  1. nxshuks

    nxshuks

    Joined:
    Aug 5, 2022
    Posts:
    3
    I am using Unity Editor 2021.3.7f1. Created a PostProcessing Layer and attached it to a PostProcessingProfile. I am deploying my scene to Oculus Quest.

    My scene has one camera i.e. the MainCamera under XR Origin. Once I attach my PostProcessing Layer to this camera and deploy it to my Quest, it breaks i.e.:
    1. On the left lens, I see a blank white screen.
    2. On the right lens, I see a fixed scene.

    Without the PostProcessing Layer attached to my XR Origin camera, it deploys just fine and I can move in the 3D space, but I need PostProcessing to add some effects.

    Has anyone faced this issue? Any idea what may be wrong?
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Well, stereo rendering is done very differntly, so it wouldn't be surprising for post-processing to fail.

    You could try setting rendering method to single pass.

    However, if you're deploying to quest, this and postprocessing can be slow.
     
  3. nxshuks

    nxshuks

    Joined:
    Aug 5, 2022
    Posts:
    3
    Thanks @neginfinity . I found the Stereo rendering mode settings under the XR Plug-in Management settings, and I see they are already set to Multiview (the other option is Multi Pass).

    Per Unity docs,
    • Multiview - Multiview is essentially the same as the Single Pass Instanced option described above, except the graphics driver does the draw call conversion, requiring less work from the Unity engine. As with Single Pass Instanced, shaders need to be authored to enable Multiview. Using Unity's XR shader macros will simplify custom shader development.
    The above issue was observed with Multiview set. Is there another setting for Single Pass?
     
  4. john_unity389

    john_unity389

    Joined:
    Apr 21, 2020
    Posts:
    2
    I realise that this is late but I find that multipass fixes all of the issues I encounter, with both post-processing and shaders. I think this is because multipass means drawing each eye separately as opposed to simultaneously. Beware that your performance can (and almost certainly will) take a hit from this though :)