Hi, i am trying to reduce my app’s memory footprint.
The memory profiler is saying that shaders are taking up a fair amount of memory.
Does anyone know how shader memory size is calculated and how to reduce it?
Should i be looking at variant count and does material count matter?
The shader files are kind of like program files as far as I know, so every shader variant you have will take up some memory. The only way I can think of reducing your shader memory footprint is to delete shader variants, but most are built in by Unity and I’m not sure of the safety of removing them. Also, the materials the shader is on do not affect the size of the shader.
Reducing the Memory impact of shaders is indeed mostly about reducing the amount of variants. Check out this section of the User Manual for how to go about that