Search Unity

Unity UI Unity UI Sprite Blurry with Map Maps Enabled for Non 2^X Textures.

Discussion in 'UGUI & TextMesh Pro' started by Zullar, Jul 31, 2019.

  1. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    2019.1.2

    I have a 90x90 sprite texture.

    In the Unity UI it is crisp and clean if I put it in an 90x90 Image.

    However if I enable mipMaps on my sprite import settings then it becomes blurry.

    Why would a 90x90 texture being scaled to a 90x90 pixel Image be blurred in this way when enabling mip-maps? My guess is that the mip-maps converts the 90x90 to a 2^X or 64x64 image, then upscales it to 90x90 making it blurry. Unsure if this is intended (I don't know much about mip-maps). But my intuition tells me that a 90x90 image w/ mip maps should be stored as...

    1x1
    2x2
    4x4
    8x8
    16x16
    32x32
    64x64
    ***AND*** 90x90 or 128x128 (but this doesn't appear to be happening and therefore makes it blurry)

    The reason I believe this is happening is because if I look at Texture.mipmapCount it = 7 (not 8). This leads me to believe the 90x90 or 128x128 is not included in the mip-map data... only storing the largest of 64x64... causing it to be blurry.

    Anyhow thought I'd share this strange behavior in case anybody gets the same blurry image mip-map issue.

    *EDIT* Project Settings was set to Fastest w/ Texture Quality = Half Res to get this to occur. Maybe a non-mip mapped texture does not get set to half-res and this explains why it stayed crisp?
     
    Last edited: Jul 31, 2019