Search Unity

Shader Warmup Coroutine

Discussion in 'General Graphics' started by Skjalg, Sep 23, 2020.

  1. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    211
    Hi

    I was wondering if we could get a Shader.WarmupAllShaders coroutine. Right now, on the very first run of our game this takes 17 seconds. (Subsequent runs it takes 1 second)

    But 17 seconds is too much.

    I know I can warmup shader collections, but recording shader collections and maintaining them are a huge hassle and we would much rather just warmup all shaders on startup while showing something that moves (i.e. movie)
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,023
    Hi!
    Which graphics APIs/platforms does your game target?