- Home /
Other
Sprite renderer, bad perfomance on mobile
Hello, I'm currently testing a game where I render a lot of sprites with the diffuse sprite shader on screen at the same time (around 70-100). I get REALLY bad perfomance (10 fps) when testing on a Samsung Galaxy s2, but good performance on a htc one. I tried changing all the sprite game objects to quads instead, with the mobile diffuse shader, and I get a lot better performance (60-80 fps). Have you guys experienced the same thing? I'm okay with using quads, it would just be nice however to use the built in sprite system.
PS. I disabled the game character, and everything that has any code in it, to make sure that it was the sprite gameobjects causing this problem. They are static and to not move.
I should probably mention that all the gameobjects use the exact same sprite, so it shouldn't be a draw call issue.
Thanks!
Answer by Bunny83 · Aug 10, 2014 at 12:01 AM
I guess you don't use a sprite texture atlas, right? Without an atlas each sprite still has it's own drawcall since each sprite will have it's own texture. You should bake an atlas for all your sprites so they actually batch together.
Isn't the sprite material supposed to take care of that? And also, all the objects use the same sprite, so it shouldn't make multiple draw calls? Also, that doesn't explain why using quads gives much better performance...
this is seems to be not true with universal renderer pipeline, I have all the sprites into atlas and the damn sprites some times doesn't seems to draw into the same draw call but takes multiple draw calls for each and I cant believe whats going on here
Follow this Question
Related Questions
2d game performance is bad in mobile, but giving 80 to 130 fps in pc, its physics game, help plz 2 Answers
What can I do to further optimize mobile game? (2D) 0 Answers
Can't create a 2D sprite with Sprite.Create when creating texture in code 1 Answer