Jagged / Pixelated edges on all sprites


(Before I start I`m talking about 2D Sprites not Textures)

My 2D sprites made in adobe illustrator look horrible jagged and pixelated when are not in exactly horizontal and vertical position. So basicaly when am rottating pretty much anything.

Import Sprite settings:

Tried both bilinear and trilinear
4096 size (I export it from AI in 4kx4k)
Format tried compressed and 16bit

This is the result:

any help pls? Isnt there any antialiasing?

Turning on “Generate Mip Maps” solved this for me.

It looks like the resolution for the texture you are using is too large. Imagine a large image youve scaled down. The pixels in the image are fighting over the same screen space. A solution could be to make the image for that sprite smaller.

If you need to zoom in and out, try creating your own “LOD system” like the built in lod system for 3d models. As you zoom in, at a certain threshold, replace the image with a larger resolution texture. Zoomed out = smaller

Turn on bilinear filtering for the textures.

Same issue in my case it was resolved by upping the “max size” of the sprite in the import settings.

In my case, I needed to enable “Alpha Is Transparency” in the Advanced Options of my spritesheet in the Inspector (using Unity 5.5.4).,In my case, I needed to enable “Alpha Is Transparency” in the Advanced Options for my spritesheet in the Inspector.

Was playing around with the jagged edge problem in Unity and found a solution which may help someone else. I basically created my UI sprite in photoshop at 2048px x 2048px and imported it into Unity. Then in the inspector settings, I made the following changes:

  1. Generate mip maps
  2. Mip maps preserved coverage
  3. Filter mode Binilear
  4. Set compression to none

I hope this helps anyone struggling with jagged edges on UI sprites as this managed to solve the issue for myself.