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

Question Shader stripping and in-game graphics settings

Discussion in 'Universal Render Pipeline' started by Peter77, Jul 29, 2023.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,419
    When the game offers settings to enable or disable Realtime-Shadows, SSAO, Anti-Aliasing, Decals during runtime using scripting by manipulating the URP pipeline asset, how does shader stripping function in this scenario?

    Does shader stripping work properly in such cases or does it remove essential shader variants that the build pipeline cannot detect? In other words, do I need to disable shader stripping in such case?
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,835
    The build pipeline cannot detect this.
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,419
    Thank you for your answer. I assume in such case the correct way would be to turn off shader stripping?
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,835
    I hope it's not the only way here :D
    I think multiple pipeline settings assets would be the best way to go in this case. I'll double-check internally :)
     
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,835
    Seems like this is, indeed, the best option. This will definitely increase the build times, but at least they won't skyrocket compared to completely disabling stripping.