Search Issue Tracker
By Design
By Design in 6000.5.X
Votes
0
Found in
6000.0.67f1
6000.3.8f1
6000.4.0b8
6000.5.0a7
Issue ID
UUM-135349
Regression
No
VFX instances fail to batch when Set Lifetime is disabled
How to reproduce:
1. Open the attached "IN-130682" project
2. Open the "VFX Test" Scene
3. Open the Frame Debugger window (Window > Analysis > Frame Debugger)
4. In the Frame Debugger window, click "Enable"
5. Observe the number of draw calls under "DrawOpaqueObjects"
Actual result: Two draw calls are present
Expected result: One draw call is present
Reproducible with: 6000.0.0b11 (a707ca4efec4), 6000.0.68f1, 6000.3.10f1, 6000.4.0b10, 6000.5.0a7
Could not test with: 2023.1.0a10 (Project gets stuck on "Initial Asset Database Refresh"), 2023.2.0a16 (Visual Effect Graph warnings and Visual Effect not rendering), 2023.3.0b1 (8ec5c23b39da) (Two draw calls are present when Set Lifetime is enabled)
Reproducible on: macOS 26.2 (M1 Max)
Not reproducible on: No other environments tested
Note: After enabling “Set Lifetime”, only one draw call is present
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
VFX instancing does not always batch drawcalls, it depends on a number of conditions. In this particular case, the drawcalls are not batched when Set Lifetime is disabled because they become immortal particles. Particle systems with immortal particles have a fixed number of particles which allows us to draw the exact number of particles instead of the total capacity. Each instance could have a different particle count, so, if we rendered them batched, we would have to determine which instance they belong to in the vertex shader, which has a cost (especially for mesh outputs). Other features, like draw indirect, also trigger separate drawcalls.
However, having more drawcalls does not always mean worse performance. Those drawcalls are queued one after another and don't require setting up the shader properties again, so they are faster than other drawcalls. You can find more information here:
https://discussions.unity.com/t/vfx-graph-instancing-not-working/1592121/4
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.
Resolution Note (6000.5.X):
Thank you for reporting a bug to Unity.
After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. We understand this may differ from your expectations or workflow.
VFX instancing does not always batch drawcalls, it depends on a number of conditions. In this particular case, the drawcalls are not batched when Set Lifetime is disabled because they become immortal particles. Particle systems with immortal particles have a fixed number of particles which allows us to draw the exact number of particles instead of the total capacity. Each instance could have a different particle count, so, if we rendered them batched, we would have to determine which instance they belong to in the vertex shader, which has a cost (especially for mesh outputs). Other features, like draw indirect, also trigger separate drawcalls.
However, having more drawcalls does not always mean worse performance. Those drawcalls are queued one after another and don't require setting up the shader properties again, so they are faster than other drawcalls. You can find more information here:
https://discussions.unity.com/t/vfx-graph-instancing-not-working/1592121/4
We will close this case as 'As Designed.' If you have feedback on how the feature could better meet your needs, please let us know - we value your input and consider it in future improvements.