Author Topic: Bilinear/Trilinear texture filtering and texture atlas creation  (Read 2409 times)

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
Hi Aren,
Is there anything that could be done re the atlas textures being created as trilinear textures? I'm not implementing a 3D ui so have having the trilinear filtering enabled is something I have to remember to change every time I update an atlas.  (I've not tested performance wise but trilinear will be doing more texture sampling than bilinear so in theory it's going to be slower). So maybe we can have an NGUISettings option to remember the users filter mode preference? or only set trilinear filtering if mipmaps are enabled? or you could grab the current filtering mode from the texture before updating/replacing it?

thanks
« Last Edit: August 06, 2014, 01:06:53 AM by beermoney »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bilinear/Trilinear texture filtering and texture atlas creation
« Reply #1 on: August 06, 2014, 11:49:31 PM »
There is no noticeable difference between trilinear and bilinear filtering from my experience.

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
Re: Bilinear/Trilinear texture filtering and texture atlas creation
« Reply #2 on: August 07, 2014, 01:39:00 AM »
is that something you have profiled on mobile Aren? possibly with mipmaps off there's no extra textures to sample hence performance is identical

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bilinear/Trilinear texture filtering and texture atlas creation
« Reply #3 on: August 07, 2014, 03:48:51 AM »
Nope, I haven't tried it on mobiles. Texture filtering support is done on hardware and is extremely optimized though. Give it a try though, see if you can spot any difference. I imagine the only slowdown would be from not using mip mapping and then shrinking the atlas texture (by shrinking a sprite) -- and it will be the same regardless of filtering.