Shader Variant Collections
intermediate conceptsShader Control · Core Concepts
Shader Variant Collections
Shader Control can create Shader Variant Collection assets to prewarm shaders at startup, preventing runtime compilation stalls (hitches). For background on this Unity feature, see the official Unity documentation.
What is a Shader Variant Collection?
A Shader Variant Collection groups one or more shaders with specific keyword combinations (variants). Unity loads and compiles these variants during scene load or via scripting, avoiding the stutter that occurs when a shader is first used at runtime.
Creating a Collection from Build View
- Open the Build View in Shader Control.
- Locate the shader you want to prewarm.
- Expand it and click the Advanced button.
- Specify the keyword combinations (variants) your game actually uses.
- Click Create Shader Variant Collection.
Build optimization bonus: When you specify variants from the Advanced window, Shader Control ignores all other variants for that shader during build — saving compilation time and reducing build size.
Next Steps
See the Window Stats page to understand the impact of your changes on total variant count.
Was this page helpful?
Suggest an improvement
Help us improve this documentation page.