Version: Unity 6.7 Alpha (6000.7)
Language : English
Compile shaders with the DirectX 12 compiler
Introduction to shader variants

Reducing shader variants

Strategies for reducing shader variants to optimize builds and performance.

Page Description
Introduction to shader variants Understand how Unity compiles shaders into multiple shader variants.
Check how many shader variants you have Use the shader logging and profiling tools in Unity.
Reduce shader variants Prevent Unity compiling shader variants.
Reduce shader variants in custom shader code Use the #pragma directive or preprocessor macros to limit shader variants in custom shaders.
Default keyword sets Resources for the default shader keywords in Unity, and creating sets of built-in keywords.

Additional resources

Compile shaders with the DirectX 12 compiler
Introduction to shader variants