Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.29f1
2021.3
2022.1
2022.2
Issue ID
1411407
Regression
No
Unity default "Particles/Standard Surface" Shader allocates too much memory compared to other Shaders
How to reproduce:
1. Open the attached "case_1411407" project
2. Open the "Window -> Analysis -> Memory Profiler" window from the menu
3. Capture a new Snapshot and select it
4. Select the "Shader" object category in the Tree Map
5. Observe the displayed object sub-categories of the "Shader" category
Expected result: Maximum size of the "Particles/Standard Surface" Shader is ~2 MB
Actual result: "Particles/Standard Surface" Shader takes 30-72 MB (depends on Unity version) compared to other Shaders, which maximum size is ~2 MB
Reproducible with: 2019.4.39f1, 2020.3.34f1, 2021.3.3f1, 2022.1.1f1, 2022.2.0a13
Note: Shader size trend:
2019.4.0f1 - 35.2 MB, 2019.4.39f1 - 71.2 MB
2020.3.34f1 - 71.8 MB
2021.3.3f1 - 72.5 MB
2022.1.1f1 - 72.2 MB
2022.2.0a13 - 72.3 MB
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Hi,
This shader has a lot of variants therefore takes up a lot of memory in the Editor.
However, only used variants should take up space in player data. So memory usage should be much lower there unless lots of particle variants are being used.