Unity Issue Tracker - Shader variants take too much memory at runtime
Fixed
UUM-5566
Shader variants take too much memory at runtime
Unity: Shader System
Fixed
2023.1.X
2022.2.X
2022.1.X
2021.3.X
Won't Fix
2020.3.X
We won't backport this to 2020 LTS, 2021 diverged too much
The attached project has a shader with 30K vertex and 30K fragment variants. Only one variant is used at runtime.
STR:
1. Make sure "Development build" and "Auto connect profiler" are checked in the Build window.
2. Build and run the attached project, wait for it to show a cube.
3. Take a detailed memory snapshot of the running player.
Expected: Unlit/NewUnlitShader uses less than 100 MB of memory
Actual: Unlit/NewUnlitShader uses nearly 130 MB of memory.
Prioritise and Follow this issue
Have a workaround or additional info about this issue?