Search Unity

Different settings for anisotropic filtering are confusing

Discussion in 'Documentation' started by VIC20, Sep 12, 2014.

  1. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,689
    0 is the point of confusion:

    1. In the editor you can set it from 0-9

    2. per script:
    http://docs.unity3d.com/ScriptReference/Texture-anisoLevel.html

    "The value range of this variable goes from 1 to 9, where 1 equals no filtering applied and 9 equals full filtering applied."

    3. per script for force mode:
    http://docs.unity3d.com/ScriptReference/Texture.SetGlobalAnisotropicFilteringLimits.html

    "ForcedMin value controls the minimal anisotropy level set when Anisotropy is forced. globalMax value controls the max possible anisotropy level. set any to -1 to use default values." <-- that sounds a lot like 0 is a valid setting.

    What is setting it to 0 in the editor good for? Why is that possible at all?
     
  2. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,689
    Another awesome example of the manual:

    http://docs.unity3d.com/ScriptReference/RenderTexture-antiAliasing.html

    "The antialiasing level for the RenderTexture.
    The value is specified as a power of two (0, 1, 2, 4 or 8) indicating the number of multisamples per pixel."

    real life result of setting it to 0:

    Invalid antiAliasing value (must be 1, 2, 4 or 8)
    UnityEngine.RenderTexture:set_antiAliasing(Int32)


    Let me quote something:
    "In theory, the Asset Store saves $1.4 billion in labor costs to the industry each year."

    Now imagine the manual would be correct, that would save even more than $1.4 billion. EACH mistake of the manual will in worst case be multiplied by the 1.4? million users of unity - that results in a huge amount of hours which is worth a giant amount of money. And it is much easier to fix the manual than anything else.
     
    sloopidoopi likes this.
  3. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Sorry to bump this, but this is still a problem in the latest online documentation for Texture.anisoLevel. It says that there are 1-9 levels of aniso when the texture import inspector clearly states 0-16. Where 0 is actually off and 1 is on. Also it should be noted that aniso only really works when mipmaps are enabled so maybe the inspector should disable it or the documentation should mention it.
     
    VIC20 likes this.
  4. Docman

    Docman

    Unity Technologies

    Joined:
    Oct 19, 2012
    Posts:
    11
    This problem has just been pointed out to me. I'll get on to it and make sure the documentation is corrected.
     
  5. Docman

    Docman

    Unity Technologies

    Joined:
    Oct 19, 2012
    Posts:
    11
    So, the "0" value for anisotropic essentially means "never ever use anisotropic on this texture".
    Whereas other values are "use this anisotropic (1 being "off"), but if quality settings overrides it then so be it".
    e.g. if you set anistoropic to 1 ("off"), but quality settings is set to "anisotropic filtering: force on", then it will be used on that texture.
    Aniso value of 0 is only different from 1 in this regard; 0 means "never ever use it".
     
    hickna likes this.
  6. Docman

    Docman

    Unity Technologies

    Joined:
    Oct 19, 2012
    Posts:
    11
    I'm updating the docs with this information.
     
  7. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    I see, thank you for updating the docs with this information.
     
  8. Velro

    Velro

    Joined:
    Jan 24, 2014
    Posts:
    2
    twhittaker likes this.