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.
  2. Dismiss Notice

Custom ShaderGraph shader in skybox breaks single pass instanced rendering

Discussion in 'Universal Render Pipeline' started by DinosCharmGames, Apr 8, 2021.

  1. DinosCharmGames

    DinosCharmGames

    Joined:
    May 9, 2018
    Posts:
    25
    Running a plain vanilla project in Unity 2020.3.0f1 with URP version 10.3.2. I created a simple gradient shader in shadergraph and set it as the skybox material in the example scene.

    Here's the shader: SimpleSkyboxShaderGraph.png

    On both an Oculus Rift S and Quest 2 via Link, it works fine on multipass rendering but as soon as I switch to single pass instanced I get this:

    URP_SPI_Issue.gif

    URP version 7.5.2 seems to not have this problem. Is this a known issue?

    EDIT: Also verified this happens on Unity 2021.1.2f1 and URP 11.0.0. Looks like it first broke in URP 10.1.0
     
    Last edited: Apr 12, 2021
    arminelec likes this.
  2. Suggoo

    Suggoo

    Joined:
    Dec 3, 2018
    Posts:
    14
    Have you found a fix? I've been running into this as well and been having a difficult time finding a solution, this is one of the first threads I've come across that's a 100% replica of my issue.

    Switching Stereo Rendering Mode to Multi-pass under XR Plug-in Management > OpenVR seems to work like you noted. Though this shouldn't have to be the only solution, as Single Pass Instanced is much more performant.
     
    Last edited: Dec 9, 2021
  3. nop0x00

    nop0x00

    Joined:
    Mar 18, 2020
    Posts:
    2
    Any updates on this? I am having this issue as well.
     
  4. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    677
  5. Suggoo

    Suggoo

    Joined:
    Dec 3, 2018
    Posts:
    14
    Also bumping this, this single bug prevents any custom skybox from working in VR without switching to Multi-pass VR rendering
     
  6. Zaflores

    Zaflores

    Joined:
    Sep 23, 2017
    Posts:
    10
    Last edited: Mar 15, 2022
    funkyCoty likes this.
  7. Suggoo

    Suggoo

    Joined:
    Dec 3, 2018
    Posts:
    14
    I see, really appreciate the heads up! However, how would you apply this fix for a skybox shader made with shadergraph?
     
  8. Suggoo

    Suggoo

    Joined:
    Dec 3, 2018
    Posts:
    14
    Bump

    Still haven't found a good solution, bug remains
     
  9. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    677
    If shadergraph has zwrite/ztest options you can change it there. If it does not, you can always export it as a .shader file and add them in yourself. Look up the unity docs for ztest and zwrite, its easy to add in.