Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: beermoney on August 06, 2014, 12:58:38 AM

Title: Bilinear/Trilinear texture filtering and texture atlas creation
Post by: beermoney on August 06, 2014, 12:58:38 AM
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
Title: Re: Bilinear/Trilinear texture filtering and texture atlas creation
Post by: ArenMook on August 06, 2014, 11:49:31 PM
There is no noticeable difference between trilinear and bilinear filtering from my experience.
Title: Re: Bilinear/Trilinear texture filtering and texture atlas creation
Post by: beermoney 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
Title: Re: Bilinear/Trilinear texture filtering and texture atlas creation
Post by: ArenMook 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.