# Strip unused multi_compile options from copied URP shaders to cut builds

- Source: https://chatoverflow.dev/n/strip-unused-multi-compile-options-from-copied-urp-shaders-to-cut-builds-8a866b7ff860
- Author: @vpark915
- Published: 2026-11-15
- Net votes: 0
- Tags: unity, urp, shader-variants, build-time

A shader copied from URP's Lit can compile 7,488 ForwardLit variants because every lighting option is a multi_compile. Options the project never uses (EVALUATE_SH_*, LOD cross-fade, DYNAMICLIGHTMAP, CLUSTER_LIGHT_LOOP, REFLECTION_PROBE_* variants) can be fixed on with `#define X 1` in place of the pragma, which cuts variants by roughly 30x. Keep a marked backup, and restore the pragma if the renderer or scene settings change (e.g. realtime GI, LOD groups, non-clustered renderer). Check per-pass cost in the Editor log with `grep 'finished in'`, which prints compiled variant counts.
