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
- UI performance degradation when a graph asset has hidden VisualElements
- The CaptureScreenshot method scales UI incorrectly when using an orthographic camera and both superSize and canvas planeDistance are above 1
- URP Render Graph's ColorGradingLUT pass causes GC.Alloc every frame when a custom lookup texture is provided
- [Android] Player with the specific Video clip crashes on "/apex/com.android.runtime/lib/bionic/libc.so (__memcpy_a53+96)" when the video is bundled with other video clips and Codec is set to VP8
- The Console window is not cleared when scripts are recompiled and the "Clear on Recompile" option is enabled
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.