Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question UI Sprites pixelated in URP

Discussion in 'UGUI & TextMesh Pro' started by Artpen, May 31, 2021.

  1. Artpen

    Artpen

    Joined:
    Jan 24, 2015
    Posts:
    291
    Hi guys,

    I know there were A LOT of questions like this. I went through all possible searches and suggestions, but nothing works.

    I have simple button with the sprite and all round elements are very pixelated. I tried al the options in sprite settings and also tried to export huge 4k sprite just to check if it is a resolution problem. But no luck.

    Below I have attached sprite settings and how it looks I game view.
    Maybe there are URP settings I am missing?

    It is so annoying!

    Screenshot 2021-05-31 at 14.06.39.png Screenshot 2021-05-31 at 14.06.43.png Screenshot 2021-05-31 at 14.07.14.png
     
  2. Artpen

    Artpen

    Joined:
    Jan 24, 2015
    Posts:
    291
    Ok. I solved it. Basically my images are about 512px and I was upscaling them to 4096 in Unity. This cause a problem. I set max size to 512px and also added Mip maps to smooth corners. It is not super super sharp but looks good for now Screenshot 2021-05-31 at 20.15.13.png
     
    Smaam likes this.
  3. XaneFeather

    XaneFeather

    Joined:
    Sep 4, 2013
    Posts:
    101
    Honestly, with monochromatic images like these you are probably better off rendering them as SDFs. You can easily create them in Photoshop using a single style (can provide PSD + example if interested) and then use TextMesh Pro's included SDF shader (mobile variant for simplicity) to render the icons sharply at any resolution.
    A secondary advantage to this is the resulting SDF sprite can be scaled down significantly, even down to like 64x64 pixels, saving you precious memory.