2D Toolkit Forum

2D Toolkit => Support => Topic started by: milos on November 20, 2013, 09:23:18 am

Title: Trimming performance overhead
Post by: milos on November 20, 2013, 09:23:18 am
Hi!
I just wanted to know if there is any significant cpu or storage overhead if I trim my sprites before adding to Unity and creating Sprite Collections of them.
I have scenes with maybe 100 sprites, also running sprite animations. The majority of them are (when trimmed) only 100-300 pixels high/wide. Without trimming the transparency, all of them are 1024x768.

Development target is iPad 2+.

It takes me a little time to pre-trim them, so using the automatic trimming in 2dtk is prefferable. Unless the runtime un-trimming is performance heavy?
Thanks in advance
Title: Re: Trimming performance overhead
Post by: unikronsoftware on November 20, 2013, 10:01:30 am
There is no cost at all for runtime untrimming, if anything it will be faster as the transparent pixels won't need to be drawn.
Title: Re: Trimming performance overhead
Post by: milos on November 20, 2013, 10:26:43 am
OK so from now on I can just forget about trimming sprites in photoshop and instead just let them get trimmed automatically by 2dtk...
Although it increases source sprites' sizes a lot, I guess it is okay since only the trimmed sprite atlas is baked into binary
Thanks for your reply