- Home /
Cheapest way of rendering 2000 sprites?
I'm trying to make a little isometric terrain generator using sprites. The goal is to bring this to mobile once it's a game.
But I'm noticing quite low FPS rates once I start zooming out and showing more sprites on screen. I checked the profiler and it dips below 10 fps on my Nexus 4 once I hit around 2000 sprites on screen. The solution would obviously be not zoom out so much, but is there a way to maximize performance?
Is for instance, the standard sprite shader a cut-off shader, of does it look for gradual alpha values? Is there a better shader out there?
I've already eliminated some sprites that were being rendered under others and disabled them.
Do you mean a single big image with all the sprites on it? No I'm using single images. Would one big one help?
Also, doesn't that only impact initial loading time?
Yes, that's what I'm talking about. Using Sprite-sheet helps. It might not totally resolve your problem but it will surely help you up your frame rate.
Thank you, I will try that right away. I also noticed a lot of empty space in my sprites thanks to your comment.
Answer by _joe_ · Apr 03, 2015 at 02:30 PM
Make sure all your Sprites have the same Packing Tag in the Texture Importer and use the built in Sprite Packer to pack them into 1 Atlas. This will batch everything and will reduce the drawcalls since it's only using 1 texture instead of many:
Your answer
Follow this Question
Related Questions
Allow 2D sprite to receive light from any direction and show on both sides 0 Answers
How do I write a cutout sprite shader to depth depthtexture ? 0 Answers
How to access SpriteRenderer Color from a shader? 1 Answer
Rigged 2D Sprite looks weird after adding a shadergraph material 0 Answers
Unity 5.4 - Sprite Shadow 0 Answers