Unity Issue Tracker - Dynamic Branching generates Shader Variants when building the Project
Fixed
UUM-48599
Dynamic Branching generates Shader Variants when building the Project
Unity: Shader System
Open
6.0.X
Fixed
2023.3.X
2022.3.X
Won't Fix
6.1.X
2023.2.X
2023.1.X
Filter out dynamic branch keywords when computing shader variants.
Cancelling this 2023.2 tech release issue since the support for this release has come to end of life. Cancelling this 2023.2 port case does not affect any LTS or Unity 6 Beta/Preview that remain open.
Reproduction steps:
1. Open the attached “Test Project” project
2. Make a Clean Build of the Project (File > Build Settings > Build > Clean Build)
3. Open the Project Auditor window (Window > Analysis > Project Auditor)
4. Press the “Analyze” button
5. In the Project Auditor window view Compute Variants (View > Assets > Shaders > Compute Variants)
Expected result: There are no variants with the dynamic_branch keyword
Actual result: There are over one million variants with the dynamic_branch keyword