ShaderOS reports variant counts as theoretical upper bounds before Unity's stripping pass. This page explains what that means and how to use these numbers correctly.
For each shader, ShaderOS counts the independent keyword dimensions in the source:
#pragma multi_compile A B C— contributes dimensions equal to the number of options#pragma shader_feature_local KEYWORD— contributes one on/off dimension_placeholder entries do not add a dimension
Estimated count = 2^N where N is the total dimension count.
A shader with 20 keyword dimensions has a theoretical maximum of ~1M variants. ShaderOS reports this number.
Unity does not compile all theoretical variants. Stripping passes include:
- shader_feature stripping — only variants enabled on build materials are compiled
- Platform stripping — variants for unsupported platform features are removed
IPreprocessShaderscallbacks — custom stripping rules eliminate variant categories- ShaderVariantCollection — when present, limits which variants compile for certain shaders
A shader reporting ~2M theoretical variants may compile fewer than 10,000 — often far fewer.
Variant estimates identify relative risk between shaders, not absolute build impact.
Use them to find which shaders have the highest keyword dimensionality. Those are the candidates for stripping analysis. Do not use the project total as a direct build time or size predictor.
The Variants tab labels all figures as (pre-strip) at the data level.
The Strip candidates column in the Variants tab estimates how many local keywords on a shader have no evidence of active material usage. In the free edition this is a count. ShaderOS Pro (coming soon) will provide specific keyword names and safe-to-strip recommendations.