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

How to use the new experimental ShaderWarmup API?

Discussion in 'Shaders' started by pekpatchedreality, Oct 7, 2021.

  1. pekpatchedreality

    pekpatchedreality

    Joined:
    May 14, 2021
    Posts:
    1
    Hello,

    After profiling and coming to the conclusion that the preloaded shaders aren't being warmed up on iOS, according to this documentation, I should be using the new ShaderWarmUp API which is designed to work on all graphics APIs. However, I cannot find any documentation online for how to use it.

    Specifically, I have no idea how to configure the ShaderWarmupSetup.

    I would really appreciate some help.

    Thank you.
     
  2. CyrilGhys

    CyrilGhys

    Joined:
    Nov 1, 2018
    Posts:
    29
  3. BenWelsh_Krome

    BenWelsh_Krome

    Joined:
    Oct 26, 2021
    Posts:
    1
    I am also looking for this information. Its the only step I have been unable to figure out, where can I find the vertex layouts for each graphics API?
     
    PHARTGAMES likes this.
  4. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    692
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,001
    AFAIK there is no warmup method that works properly, at least on mobile, if there are any guides on how to reliably shader warmup on mobile I would be very interested.
     
  6. Steviebops

    Steviebops

    Joined:
    Apr 9, 2013
    Posts:
    132
    I can't make sense of this, is the api working or not?

    How do we actually use ShaderWarmup.WarmupShaderFromCollection?
     
  7. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    702
    I've been digging the docs and forums for that information as well with no success. Any new pointer as of 2022-11-10?

    The old method doesn't really work for consoles and I'd like to test it out using ShaderWarmup, but I can't find any example code.