Search code examples
filterlibgdxtexture-atlas

Libgdx What TextureAtlas filter should I use?


What filter should I use for a TextureAtlas?(Linear/Nearest)... This is my current setting in the atlas file:

filter: Linear,Linear

Solution

  • Filters rather do not have big impact to performance (when we tell about small sprites) although there are some serious differences between them.

    In practice Filters describe how edge of texture is being processed

    • Linear - will do edges smooth but it is possible that it will be producing some weird artifacts on connections between tiles of element created from many smaller sprites - also can cause problems with big textures
    • Nearest - will do edges sharp which will be very bad for some circles
    • MipMap - connects pros of Linear and Nearest but will need more space for many versions of sprite

    Take a look at this great article that @Enigo reccomends you to get more information.