Quick answer: Unreal Material with 10 static switches generating 1024 variants per quality level? Static switches multiply; replace with constant parameters where the runtime value is known.

Material has 10 boolean static switches. PSO precompile generates 1024 variants per Effects Quality level (3 levels). 3072 PSOs.

Convert static switches to constants

If a switch state is known per-instance, set as constant at material instance creation. Compiles one shader; runtime branches.

Reduce switch count

Audit each switch. Many are 'just in case'; remove if not actually used.

Whitelist used combos

PSO precompile only the combos you actually use. Build report shows the used set.

“Static switches are 2^N. Audit ruthlessly.”

Track variant counts as a project metric. Sudden growth indicates an accidentally-added switch.

Related reading