Hello.
Our pipeline to prewarm shaders:
Editor time:
- collect android logcat messages with compiled shader variants
- parse them to ShaderVariantCollection. ShaderVariant
- remove invalid variants
Runtime:
- filter variants by runtime situation (for example - use shadow or not)
- for each variant
- Temp ShaderVariantCollection. Add(variant)
- Temp ShaderVariantCollection. WarmUp()
- Temp ShaderVariantCollection. Clear()
- skip frame
And eveything work as expected, but: warmup take huge time, but not for simple compile by rendering.
Honor 10 XLite: ~700 ms for first warmup after install, variant with 6 Keywords.
Redmi 9C: ~18 000 ms for first warmup after install, variant with 7 Keywords.
- Unity 2020.3.18f1
- Android
Can anyone tell me - why?
A bit later I’ll add more info here.