At the moment I'm setting the anti alias to true when bringing in my textures:
local atlas2 = TexturePack.new("Atlases/Atlas 2.txt", "Atlases/Atlas 2.png",true);
But I've hit problems...
Some sprites look better with and some without anti-aliasing.
Here's a screen grab from by game, the image on the left is with anti alias off, the one on the right us using it.
The grass is much smoother on the left, yet the skull is much more defined on the right image.
I could split images between two texture packs, ones that look better with and ones that look better without, but this seems like a long winded way of working.
Anyone else find this? Am I missing something?
Thank you!
Comments
Do you scale any of the images?
Texture filtering that you are using is mostly used for scaling. For example, if using letterbox you'll run your app on the large screen (as tablet) then you'll see that in both cases it will be better with texture filtering (antializing)
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Filtering
+ smooth animation (using Gtween)
+ rotating and scaling images smooth
- images slightly blurred at all resolutions
No filtering
+ Sharper sprites
- Jagged when rotated / scaled
- Animation is not as smooth using gtween.
- Sprites don't scroll smoothly around the screen
How are others tackling this?
EDIT: Did a fair bit of testing on iphone 5 device and iphone 3 devices today (retina and non retina). The problems are greatly reduced on the retina screen.
It seems the ideal solution is to split sprites between two atlases - one that has filtering applied (backgrounds, anything that rotates / scales in the game) and one that doesn't - for the main character, collectibles etc.
@OZApps - thank you.
It would be good if we could deflag the filter for texture regions, or load it unfiltered and flag it for certain regions...
https://deluxepixel.com