I found that guide: https://thinhhb.wordpress.com/2016/03/27/unity3d-optimization-make-atlas-textures-for-particlesystem-reduce-drawcall-why-not/ which is quite clever.

As far as I know, we can't batch ParticleSystems with different materials, for example:

  • A star (Particles/Additive)
  • A smoke (Particles/Additive)

give 2 draw calls.

The guide points, that we can use a TextureSheet trick to achieve batching of different graphics on multiple ParticleSystems like that:

  1. We create a spritesheet manually and cut it in Unity's SpriteEditor into a grid, and create a material:

enter image description here

  1. Then, we create our ParticleSystems and attach generated sprites into Texture Sheet Animation Module:

enter image description here

And here the magic happens. They batch.

My question is, what is the overhead behind this? Is the TextureSheetModule expensive?

If I have 15 different sprites, their ParticleSystems create 15 batches, which is quite expensive on mobile.

Is it wise, to move to TextureSheet and save these 14 batches?

  • \$\begingroup\$ This sounds like something you can measure for yourself, on your target hardware, with your real assets, to get an answer far more trustworthy than any internet hearsay us randos might spout. ;) Set up a test scene that pushes your particle rendering to its limits without the atlas trick, then another identical scene but using the atlas trick. Try them both on your device and compare their speed and quality. \$\endgroup\$ – DMGregory May 29 '18 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.