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

Feedback SRP batcher and subshaders

Discussion in 'Universal Render Pipeline' started by elijad, Oct 25, 2021.

  1. elijad

    elijad

    Joined:
    Mar 19, 2020
    Posts:
    46
    Is there any planned fix on this? On windows it seems to only render the first subshader if SRP batcher is enabled. On Android having subshaders breaks SRP batching altogether. It's pretty inconvenient to have all passes in the same subshader since cbuffer size must match and you can't just have a single file with a shadowcaster pass that is automatically included everywhere. If I create a SubShader with a UsePass statement in it, the batching breaks. If I want to add the same pass to multiple shaders, I have to copy the whole pass body and then adjust UnityPerMaterial buffer manually in each one.

    How such a fundamental in pretty much every case thing as subshaders wasn't even considered for SRP batcher support is beyond understanding.
     
  2. elijad

    elijad

    Joined:
    Mar 19, 2020
    Posts:
    46
    Neither does it seem to support fallback shaders. Even the built-in Lit shader has a LOD level of 300 and no fallbacks. Do I have to manually replace all shaders when switching quality levels?