Search Unity

Question Screen tearing/artifacting with OpenXR builds, and SteamVR in editor view. Suggestions?

Discussion in 'VR' started by wronginput, Mar 8, 2021.

  1. wronginput

    wronginput

    Joined:
    Apr 20, 2014
    Posts:
    8
    Hi all. The following is the default URP scene with an XR Rig thrown in. The red line in the gif is meant to be the default ray that comes from the hands in the XR rig, I just set this up as an example to ask this question.

    My setup is Unity 2020 (also 2021 for testing), a high end RTX card and CPU, and an Oculus Quest 2 connected via the official Link cable.

    When I play actual SteamVR games or Oculus games on my PC everything runs buttery smooth, so I don't think it's a driver or hardware issue.

    And when I test anything using the Oculus XR plugin, for desktop and mobile, everything looks and works perfectly both in the editor preview, and in any exported exes or apks. I don't want to just target Oculus though - although that seems like the easiest option at this point!

    The issue is whenever I try use SteamVR in Unity (even on new projects set up specifically for SteamVR) this is how everything renders in my headset when I click 'play' to test in the editor. Does anyone else experience anything that looks like this...

    steamvr-tearing-IMG_1982_1.gif

    ...?

    When I compile the game for SteamVR however, everything's fine! So it just makes for a horrible dev and testing experience really.

    Also, now that OpenXR is gaining traction, I tried forgoing SteamVR completely and created some basic test levels with just the OpenXR plugin loaded, and that appears shown above too - but with OpenXR it seems worse, as the effect appears in both the editor previews and any final compiled tests.

    Is this something I've got set up wrong do you think? Maybe related the fact it's a Quest2 used via a link cable?
     
    Ony likes this.
  2. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Does it work when you use OpenXR with the Oculus runtime instead of the SteamVR runtime? In the OpenXR Project settings you can set which runtime you want to use.
     
  3. colinleet

    colinleet

    Joined:
    Nov 20, 2019
    Posts:
    189
    This is a complete shot in the dark but in HDRP I've gotten some weird glitching lines like that before from using TXAA in my VR project specifically on fast moving objects (like ghosting but turned up to 11). The quick fix for me was moving to MSAA.

    A less draconian solution is to selectively remove movement vectors on those fast moving game objects (mostly interactables / bullets / etc). But I would occasionally get it in much much smaller increments like what's being shown in your image.

    Eventually I was able to eliminate them fully by disabling all motion blur -- not something I did to address this "bug?" but just because it was consuming around a quarter of my GPU budget and didn't add much to my game but nausea and a decimated frame rate.
     
    Last edited: Aug 7, 2022
  4. Lorcanpro23

    Lorcanpro23

    Joined:
    May 27, 2020
    Posts:
    1
    I'm having this issue but even after doing what colinleet suggested i'm still experiencing the issue. Any help?
     
  5. Shillelagh

    Shillelagh

    Joined:
    May 24, 2020
    Posts:
    1
    Same issue here. 2021.3.7f1, RTX 2070S. OpenXR with Quest 2 over air link and oculus cable (Same issue for both). Does not resolve in build for me.
     
  6. SYCHONL

    SYCHONL

    Joined:
    Nov 14, 2021
    Posts:
    3
    Same issue here. Quest Meta Pro and Unity 2021.3.16f1. Both via link cable and Air link.
    I tried fps to recommended 72hz and it still happens. This MUST BE FIXED.