Apologies if this is obvious, but I couldn’t find this clearly stated anywhere.
I am currently warming up my shaders at game start, which takes around 1 minute. This is way too long for me as I have a quite small game.
I get the log message that 80 shaders are being warmed up with around 25k variants.
That raises some questions for me:
How are the Shaders that are being warmed up selected? All Shaders from the Project? All Shaders in Resources Folders? All Shaders linked to GOs?
What is the actual performance impact of assinging a ShaderVariantCollection. I did a game run, Collected all Shaders, (only around 40 with 180 Variants) saved as A ShaderVariantCollection and added it under Graphic Settings. However, the warmup time stayed the same
Any help is much appreciated!
EDIT: To clarify, I’m currently using Shader.WarmupAllShaders
To use a ShaderVariantCollection, you should warmup those instead of using Shader.WarmupAllShaders:
Thanks a lot, thats what I did. SteamVR had a warmup for all shaders in it’s code, I commented that out and added my own shader asset under Graphic settings. My load times are around 3 seconds now!
That’s good to know actually. I’m trying to avoid specific VR plugins, but Unity 5.6 VR isn’t up for that in terms of tracking information. 2017.1 seems a lot better, but we haven’t migrated there yet.