0

Which texture filter should show best quality? (Performance is insignificant.) TextureFilter.MipmapLinearLinear or TextureFilter.Linear?

Urrut
  • 1
  • 1

2 Answers2

1

If you have mipmaps, then TextureFilter.MipMapLinearLinear is the best one. Pick Linear in the other case. Mipmapping increases quality due to noise reduction (smaller images are already antialiased with much better quality than your GPU could do). Read more: http://en.wikipedia.org/wiki/Mipmap

To use mipmaps pass 'true' as a last parameter to the Texture constructor. See:

http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Texture.html#Texture-com.badlogic.gdx.files.FileHandle-boolean-

libgdx texture filters and mipmap

Community
  • 1
  • 1
Zielony
  • 16,239
  • 6
  • 34
  • 39
  • Thanks for answer. Well how can i create mipmaps on libgdx? – Urrut Feb 02 '15 at 11:38
  • @Urrut Note that this applies to the min filter only. The mag filter should be set to Linear because there's no such thing as mip mapping for mag filters. – Tenfour04 Feb 02 '15 at 14:39
1

For the best results regarding performance/quality, you can use:

  • TextureFilter.MipMapLinearNearest for minification
  • TextureFilter.Nearest for magnification

In case you're using TextureAtlas, you can specify these filters directly in the pack file:

filter: MipMapLinearNearest,Nearest

More info available here:
Badlogic Games: Know Your Texture Filters

PhannGor
  • 541
  • 4
  • 5