So I whipped up my own sprite atlas-er and that appears to be working fine, but I noticed I was incurring a huge render hit, only after adding some textured planes as a backdrop. The performance drop is appalling (60fps ā 20~40fps varying).
So my question is, is there a shader I can use that will render a renderer in only the āfree spaceā between objects? Iām going for that classic 2D parallax look, and I need the quick performance.
Well if you need to lower overdraw using a tighter fitting mesh on things that are static or not animated (donāt change shape). However, if your losing a huge amount of performance from only a few textures it is doubtful the reason is overdraw. Youād have to be rendering a substantial number of textures for that to be a problem in a 2D game. Atlases lower your draw calls if you do them right (put all your static textures into them so several objects can be drawn at the same time).
I use 2Dtoolkit and it automates pretty much all that for you which is really nice.
Yeah, Iām already using an atlas (512px square, 15 x 15 textures @ 16px square each, 1px padding between all). I whipped up this script for the batching (mb thatās the problem?) The thing is, Iām making a tile-based platform game and need a ton of little textures for each block, so I have all the blocks mapped on the same atlas.
The reason I jumped to the overdraw conclusion is because the game runs SIGNIFICANTLY faster at lower resolutions.
@hippocoder I appreciate the suggestion, but the current budget is nil
Related quetion: Is there a way I could tell all of the objects behind an object (like āsunbeamsā planes) to render darker/lighter without resorting to alpha?