Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Quest 2 Mixed Reality - DrawMeshInstancedIndirect issue

Discussion in 'Getting Started' started by prawn-star, Nov 9, 2023.

  1. prawn-star


    Nov 21, 2012
    I have a weird issue using Unity 2022.3.12 and a scene that has a combination of objects in the scene and objects rendered direct via the GPU using DrawMeshInstancedIndirect with pass through enabled. Objects are using the same custom shader.
    I have the OVR passthrough Layer set to Underlay, Opacity 1 and have added the EnableUnpremultipliedAlpha script.
    My issue is that the objects in the scene draw over the top of the pass through camera view (as expected) but the GPU drawn objects have the camera view drawn over the top of them. It's like the multiply is inversed for them and they are masking the camera view
    I'm testing on a Quest 2
    Oculus XR Plugin 4.1.1
    XR Plugin management 4.4.0
    Standard rendering, no URP
    All objects are using a custom shader that is basically an unlit with some custom lighting added, that has instancing (for the DrawMeshInstancedIndirect calls)