Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question How to make Shader Graph compatible with Single Pass Instancing (or MultiView)

Discussion in 'Shader Graph' started by masta-yoda, Oct 26, 2022.

  1. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    I have created a custom shader using a shader graph, and it works great with MultiPass XR setting enable but renders only for a single eye with Multiview (Android) Single Pass Instancing (PC) enabled. How can I fix that to work for both eyes?

    I'm using Build-in render pipeline, Unity v2022.1.20 (latest), Oculus SDK v43, and OpenGL (not Vulkan, I cannot compile the project with Vulkan enabled).

    upload_2022-10-25_19-15-9.png
     
    Boodums likes this.
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,127
    With URP this works automatically.
    If it doesn't with built-in make a bug report.

    Also switching to URP might be benefitial for shader graph, since shader graph is designed for SRP
     
    masta-yoda likes this.
  3. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    URP works like a magic here, yes! But I stick with Build-In because it provides good Oculus VR performance (Android platform), just switching to URL gives me 40-50 FPS instead of 60-72
     
    Boodums likes this.
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,127
    1. File a bug report
    2. Then you are probably using wrong settings.
    Take a look at my sample project (has a 2021 branch)
    https://github.com/smitdylan2001/ApplicationSpaceWarp
     
  5. Kujoen

    Kujoen

    Joined:
    Apr 30, 2019
    Posts:
    1
    Is there any update to this? I'm also using the Built-in pipeline and I can't swap to URP because all my materials and UI rendering breaks. I need to accomplish this in Built-in.
     
  6. Nutaaq

    Nutaaq

    Joined:
    Jan 9, 2016
    Posts:
    10
    Any Updates?
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,127
    For shader graph use URP and properly update all materials/shaders.
    Otherwise it's best to use text based shaders in BiRP