Quick answer: Unity shader compile taking 40+ minutes in player builds? Every Shader Graph keyword multiplies variants - mark feature keywords as Local and strip unused combinations with a variant collection.

A character shader with six boolean toggles silently exploded into 64 variants per platform. Player builds spent 38 minutes in Compiling Shaders.

Promote to Local keywords

In the Shader Graph blackboard, set Scope = Local for keywords that aren't used cross-shader. Local keywords don't combine with the global keyword pool, dropping the variant count by orders of magnitude.

Strip via variant collection

Play through the game in editor and use Graphics > Shader Variant Collection > Save to Asset. Set Strip Unused Variants from Variant Collection in Graphics Settings and the build only compiles the combos you actually use.

Audit with the inspector

Select the shader and check Compiled Code > Show. The variant count is at the top - if you see five digits, you have a keyword problem, not a build server problem.

“Every keyword you add doubles your shader compile. That isn't a metaphor; it's literally what happens.”

Add a CI check that fails if any shader's variant count crosses a threshold - 256 is generous for character shaders, 64 is plenty for VFX.