0

I have a SKTextureAtlas which contains a list of SKTextures, but the problem is that whenever I load the SKTexture from it and state that the filtering on it is SKTextureFilteringNearest, it filters it Linear!

I have that problem only on iOS lower than 7.1, but on 7.1 everything works fine.

EDIT #1

Theis Egeberg suggested:

I'm pretty sure that pre 7.1 behaviour is that the filtering mode is shared among all textures in the atlas. If you want to use "Nearest" in 7.0 you need to make one textureatlas for nearest and one for linear. You can make a helper class which encapsulates both of course."

How do I actually do that?

enisdenjo
  • 706
  • 9
  • 21

1 Answers1

0

I'm pretty sure that pre 7.1 behaviour is that the filtering mode is shared among all textures in the atlas. If you want to use "Nearest" in 7.0 you need to make one textureatlas for nearest and one for linear. You can make a helper class which encapsulates both of course.

Pre 7.1 if you set a filtering mode on ONE of the textures, the others will follow. For good measure I usually encapsulate the two atlas's and then set linear on all the ones from the first atlas and nearest on all the ones from the other atlas.

Theis Egeberg
  • 2,556
  • 21
  • 30