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
- URP ShadowCaster2D is misplaced and distorted when used with rotated Perspective Camera
- UI mesh is drawn twice when two cameras are used
- The Scene view top menu bar disappears when any Draw Mode other than "Wireframe" is selected in the specific project with a corrupted Material
- TabView.tabClosed EventHandler passes the wrong tab index as parameter when closing a tab from oldest to newest order
- Rigidbodies clip through terrain and snap back up when Heightmap Resolution is bigger than the terrain size
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.