Optimizing Shader Load Time 优化Shader加载时间
本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/OptimizingShaderLoadTime.html
Shaders are small programs that execute on the GPU, and loading them can take some time. Each individual GPU program typically does not take much time to load, but shaders often have a lot of “variants” internally.
着色器是在GPU上执行的小程序,加载它们需要一些时间。每个单独的GPU程序通常不会花费太多的时间去加载,但是着色器内部通常有很多“变体”。
For example, the Standard shader, if fully compiled, ends up being many thousands of slightly different GPU programs. This creates two potential problems:
例如,标准(Standard ) 着色器,如果完全编译,最终会变成成千上万个稍微不同的GPU程序。这就产生了两