Search Unity

Bug OpenXR rendering bug on shadow cascade edges

Discussion in 'VR' started by RGresko, Mar 10, 2023.

  1. RGresko

    RGresko

    Joined:
    May 22, 2018
    Posts:
    14
    Hello,

    I've been having a rendering bug that only appears in release builds, but that doesn't happen in editor/run game view. In a release build I have black or mis-colored bands at the shadow cascade boundaries on several vegetation shaders which are used for grass/tree leaves/etc (pic below). The bands appear where the shadow cascades are blending between each other.

    This is an OpenXR URP build, using Unity 2021 LTS (it's been happening in all the 2021 LTS versions for at least the last 4 months) and the last few versions of URP. If I create the exact same scene/setup in a non-XR project, the problem doesn't occur in editor or in a release build.

    Any ideas on what could be happening?

     
    Last edited: Mar 10, 2023
  2. RGresko

    RGresko

    Joined:
    May 22, 2018
    Posts:
    14
    Should also note that this is a PC VR application, so the bug can be seen on my PC monitor without headset.
     
  3. RGresko

    RGresko

    Joined:
    May 22, 2018
    Posts:
    14
    I have a simple example built with just a plane and some regularly-placed grass prefabs that use the shader. The project was created fresh with the VR Core template, picking settings for OpenXR, then installing URP and adding these assets. First image is in editor game view run mode, second is from a release build.

    renderbug1.png renderbug2.png