Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Filter Mode :Point,Bilinear,Trilinear. which is the cheapest?

Discussion in 'Editor & General Support' started by bandingyue, Aug 15, 2012.

  1. bandingyue

    bandingyue

    Joined:
    Nov 25, 2011
    Posts:
    131
    or Does Filter Mode Has something to do with performance?
     
  2. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    Point is cheapest. Then bilinear, then trilinear.
    Just experiment with small texture and you will see.
     
  3. bandingyue

    bandingyue

    Joined:
    Nov 25, 2011
    Posts:
    131
    Thank you.

    And I will post my test here later.
     
  4. DigitalCandy

    DigitalCandy

    Joined:
    Jul 16, 2014
    Posts:
    5
    Still waiting bro... it's been 5 years
     
  5. JackofTraes

    JackofTraes

    Joined:
    May 28, 2014
    Posts:
    10
    Okay, since the OP probably isn't going to provide test results, I am going to give it a shot:


    Screenshot of same icon at different resolutions with different filter modes and mipmap states.
    [Default icon resolution is 512 x 512 but I only went up to 256 x 256.]

    Disclaimer: I have not explored the many options/settings (available with version 2017.3.0f3) like aniso level and different compression qualities. As such, I only have provided various filter mode and mipmap states.

    So, I came across this thread and a related Reddit post (ultimately about mipmaps) after attempting to figure out why my canvas images made my sprites look blurry (before and during runtime). Immediately after, I assumed that filter modes and mipmap states would result in uniform results - regardless of size. Apparently, this is not the case; It turned out that I needed to use different filter modes along with enabling/disabling mipmaps (depending on icon size in-game).

    As you can see from the screenshot above, and I encourage viewing at full res for better understanding, trilinear filtering seems to provide the best results (as expected). However, not using mipmaps closer to native resolution seems to provide better results than it does at lower resolutions. This is not my area of expertise, but I hope that this will help those who are also looking to create clear 4.6 UI images within a canvas.
     
  6. mrmcduck

    mrmcduck

    Joined:
    Nov 26, 2015
    Posts:
    26
    Thank you for taking the time to create the comparisons.
     
  7. JackofTraes

    JackofTraes

    Joined:
    May 28, 2014
    Posts:
    10
    No problem! As an added bonus, for the year anniversary of that post (nearly), experimenting with the PPU (Pixels Per Unit) in the import settings may be required for certain sprites, icons, and 9-slice images. This is especially true when with 9-slices that are meant to replace the default UGUI "UISprite" background of buttons and toggle backgrounds. As always, I hope this helps anyone who might need it.
     
    ExtraCat and Chiefmastoras1 like this.
  8. king_keshav

    king_keshav

    Joined:
    May 21, 2019
    Posts:
    1
    Thanks @JackofTraes for that comparisons chart . But can someone help me toh know how they impact the performance of the game , like for mobile games ?
     
  9. sammtan

    sammtan

    Joined:
    Jul 2, 2019
    Posts:
    14
    Lol
     
  10. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    234
    "Negligibly"