Search Unity

Sliced UI image - problems with mip mapping being applied to portion of button

Discussion in 'UGUI & TextMesh Pro' started by Xarbrough, Jan 17, 2019.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I'm using a UI image component with the sliced option enabled and discovered issues with mip mapping. It looks like this:

    SlicedMipMapProblem_00.PNG SlicedMipMapProblem_01.PNG SlicedMipMapProblem_02.PNG

    At ful size (first image), everything looks normal, but as soon as I change the reference pixel per unit (or basically scale the button image), the center left and right portions of the 9-slice are using different mip-map levels than the other slices. The sprites have correct 9-slice borders set and are packed into the legacy SpriteAtlas onto the same page. To my understanding, Unity should use this packed texture at runtime and only change the mip mapping level for the entire texture instead of per 9-slice segment.

    Is this a very specific bug I've ran into or can this behaviour be changed by using better settings?

    I would like to keep mip mapping enabled, because these buttons are positioned and animated through 3d space in VR, which means they have stronger artifacts without mip mapping, whereas mip mapping smooths them nicely.
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    looks like a unity bug.
    I can imagine why it happens: the scale of the sliced parts is getting very low and therefore the mip map is beeing used.
    I guess you should file a bug report.
     
  3. Houtamelo

    Houtamelo

    Joined:
    Jan 3, 2020
    Posts:
    31
    Bumping this cause i'm experiencing the same issue on Unity 2020.4 and i need mipmaping