2D Toolkit Forum
2D Toolkit => Support => Topic started by: TTkJonas on August 21, 2012, 03:49:06 pm
-
Hi,
I have two little questions.
Are there performance differences, if I use Textures with a resolution "Power of two" (256,512...), or not, because of Atlas creation from 2dtoolkit?
And are there differences if I scale my 2dSprites by using the Transform.scale parameter in the inspector, or the Scale Parameter from 2d Toolkit?
sorry for bad english and if this was already asked before. I have no answer found in the forum ;-)
lg Jonas
-
I'm not sure about performance differences with PO2 textures - I tend to use PO2 textures generally, and I use PVRTC as often as possible. PVRTC only works with PO2 textures - and they have to be square too (i.e. 256x256).
There is a difference scaling using Transform.localScale vs sprite.scale. When you use transform.localScale, dynamic sprite batching tends to stop working (there are rules to follow to avoid it breaking, but in general avoid it as much as possible). The sprite.scale parameter will actually regenerate the sprite geometry at the larger size - while this takes a bit more CPU up-front, it doesn't stop dynamic batching from working, and as such tends to be a performance win. The general advice is - prefer sprite.scale over transform.localScale.
-
Hi Unikron!
Thanks for your fast answer. :-)
So far I use the "Compressed" texture flag in the Settings Tab from the SpriteCollections. Is it also recommended to set the source file to compression PVRTC?
(http://img525.imageshack.us/img525/2338/compression.jpg)
Thanks :-)
-
You don't have to change it on the source images.