Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Graphics.Blit in VR

Discussion in 'VR' started by Hobodi, Mar 17, 2021.

  1. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    92
    Hi i got a problem. The Graphics.Blit call behaves very badly in the Oculus Quest and Open XR environments.
    My task is to display a mono image over the image. OnGui doesn't work, so I'm using Graphics.Blit.
    In OpenXR, the image has strange twitching, although it is refreshed.
    On the Oculus Quest, the picture is skewed due to the asymmetric fov.

    Is there a way to render the texture render directly to the eye, bypassing XR plugins or calling it at the end?
    At the moment I am calling Graphics.Blit (source, destination, material, 1) on OnRenderImage, where the source is RenderTexture from another camera. Built-in pipeline.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,763
    I doubt it. Is there a good reason you can't just use a world-space canvas?
     
  3. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    92
    Spend extra performance update the canvas.
    Mono rendering is needed in order to reduce the number of renders by half and increase performance in large-scale scenes.
    Funnily enough, it works great on Cardboard XR, but it has problems on Oculus Quest and PCs with OpenXR.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,763
    <--- These are my skeptical eyebrows.

    EDIT: The forum stripped out my skeptical eyebrows (U+1F928). But hopefully you can imagine them.

    Point is, I don't believe the claim that mono rendering would be any faster than what Quest and PCVR hardware is doing for stereo (especially if you use single-pass rendering mode).
     
  5. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    92
    I do not use single pass, urp and other dubiously working things.
    In terms of performance, you can easily check this. Besides, it is quite obvious that one camera works faster than two.
     
unityunity