Hi everyone. can you put multiple sprites in one batch group to optimize the draw calls?
I looked into it and couldn’t find much in forums. I tried this script but it doesn’t work.
sample scene:
https://launch.playcanvas.com/1283503?debug=true&ministats=true
https://playcanvas.com/editor/scene/1283503
Hi @Majid_Ahmady ,
I gave it a try and batching doesn’t work with animated sprites, even when they use the same texture atlas.
@mvaligursky @yaustar do you think this is something that can be supported eventually?
2 Likes
yaustar
November 30, 2021, 11:03am
4
Hmm, I wonder if it’s because an animated sprite has several meshes, one for each frame
https://developer.playcanvas.com/en/api/pc.Sprite.html#meshes
We do have a ticket open for this though. Please do comment to bump the need for this: https://github.com/playcanvas/engine/issues/3377
1 Like
Yep, as Steven mentioned, we have a ticket … but it cannot work directly with current batching system as it does not handle the logic of the animation … it handles only static meshes as such.
2 Likes