Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

HD SRP: Shader Compilation Time

Discussion in 'Graphics Experimental Previews' started by KnightsShadow, Mar 17, 2018.

  1. KnightsShadow

    KnightsShadow

    Joined:
    Jan 21, 2013
    Posts:
    14
    When trying to build my project I´m experiencing very long shader compilation times between 30-60 min. And results do not seem to get cached. Is there a way to reduce the time compilation takes? Or will this be addressed in the future?
     
  2. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
  3. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    The shader compilation time is due to the amount of variants in the HD lit shaders. Currently we don't have a way to strip multi_compile variants. We are working on a solution for that at the moment.

    This problem also affects LWRP. In LWRP we made some compromises to decrease multi_compile as it's worse on mobile due to available system memory/non binary shader support in most mobiles.
     
  4. KnightsShadow

    KnightsShadow

    Joined:
    Jan 21, 2013
    Posts:
    14
    I am fine with longer build times as trade in for better quality shaders.
    Interestingly most shader variants compile pretty fast. Only a few ones take FAR longer than the others.