Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

URP shader graph material objects don't appear on Oculus Quest

Discussion in 'VR' started by WonkeeKim, Nov 27, 2019.

  1. WonkeeKim

    WonkeeKim

    Joined:
    Apr 8, 2013
    Posts:
    11
    Objects that have material of custom shader graph don't appear on Oculus Quest.
    Default URP Lit shader works fine.
    When I changed the stereo render mode into the MultiPass rendering, it appears. But the right eye of the headset is just a black screen.

    [Tested Version]
    Unity Version 2019.3.0b11
    URP Version 7.1.5



    I tested with LWRP as well and shader graph material appears. But the right eye is distorted so the VR mode doesn't work. (SinglePass mode)
    If I changed it to MultiPass mode, the right eye is black.

    [Tested Version]
    Unity Version 2019.2.13
    LWRP Version 7.1.5


    I think LWRP/URP is not ready for Oculus Quest yet.
    Are there any roadmap about LWRP/URP in VR mode.
    Or are there anyone who solved this shader graph problem?

    Thank you.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,727
    I have the same problems but was met with complete silence when reporting them.
     
    WonkeeKim likes this.
  3. WonkeeKim

    WonkeeKim

    Joined:
    Apr 8, 2013
    Posts:
    11
    Today Unity 2019.3.0f1 has been released and I just checked that this problem has been solved!
    URP with custom shader graph works fine in the Oculus Quest! (VRMode - SinglePass)
     
    hawken likes this.
  4. olejuer

    olejuer

    Joined:
    Dec 1, 2014
    Posts:
    131
    I cannot confirm the fix. Since my upgrade to Unity 2019.3.0f1 (from 2019.2.12f1) one of my shadergraphs produces seemingly arbitrary results. It is as if the shader uses the wrong input values from the blackboard. Maybe building for Quest messes up the order. The shader still runs fine on screen and on HTC Vive, but not on Quest. Debugging is a pain, because it only occurs after I deploy to the Quest.
     
  5. WonkeeKim

    WonkeeKim

    Joined:
    Apr 8, 2013
    Posts:
    11
    Version upgrade doesn't fix the problem automatically. You need to replace your master PBR node of your shaders.
    1. Update the versions.
    2. Open your shadergraph shaders.
    3. Press 'space bar' and create 'PBR' master node.
    4. Link all the inputs into your new master node.
    5. Right-click on your new PBR master node.
    6. Click 'Set Active'.
    7. Remove your previous master node.
    8. And it will work fine.

    I hope this will solve your problem.
    Cheers.
     
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    855
    Disable MSAA in your Render Pipeline settings for now, that *should* bring it back. There is currently a GLES driver error on Oculus side apparently that Unity is working with Oculus to figure out. There are of course all kinds of hacks and workarounds in the meantime.
     
  7. olejuer

    olejuer

    Joined:
    Dec 1, 2014
    Posts:
    131
    Thank you for your help!

    Thanks for the hint. Unfortunately, it did not help, though. I do not have the issue of invisible materials, but it seems like the blackboard variables aren't read properly. If I replace them with constants, the shader behaves as expected.

    I have read about issues with MSAA and I tried turning it off, but it did not help either.

    Here is a screenshot of the shader. It renders a hole into surfaces between the camera and the character to have it always visible. Again, it works on screen and HTC Vive. It used to work on Quest with Unity 2019.2. You do not even need the script that sets the values, it just renders black and the clipping is at seemingly random positions.

    upload_2019-12-9_16-48-34.png
     
  8. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    855
    Try making sure Depth and Opaque texture are enabled in the Render Pipeline settings also!
     
  9. olejuer

    olejuer

    Joined:
    Dec 1, 2014
    Posts:
    131
    Did not help. Interestingly though, turning on opaque texture requires me to also turn off MSAA or neither shader graph materials nor world space canvases are rendered. So the MSAA issue seems to be related to opaque texture being rendered.
    I am not surprised it did not help, because I am using neither the depth nor the opaque texture.
     
  10. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    855
    You are correct, they are connected and Unity are aware of that too, a fix is in the works :)
    If you got any unreported issues please submit them with the bug reporter
     
  11. olejuer

    olejuer

    Joined:
    Dec 1, 2014
    Posts:
    131
unityunity