I searched about this problem online but none of the answers seemed to work for me. My friend is using Adobe Illustrator for creating the visuals, but whenever I use his assets, it always end up with this ugly pixelated images.
Normally, black borders are supposed to be smooth lines, but they end up with that jagged line, and overall quality has been downgraded. I thought it was something to do with anti-aliasing, so I set it to FXAA. It didn’t solve. We tried lowering image resolutions to match the button’s, which didn’t solve the problem either.
So what’s the actual size of the image - the asset? Apart from that, you’re not using 9-slice here which will be a major source of distortion and artefacts.
This is zoomed in 10x in the designer to dramatically exaggerate the effect. How to set it up depends on the expectations and on how dynamic things need to be. If your image is a square and you stretch it horizontally, it will be a mess. Hard to advice better without more details.
so I set it to FXAA. It didn’t solve.
AA method should have no impact here unless we use a widget component in world space but it does not seem to be the case here. If it was a component, the quality would be much worse.
Generally speaking, you should be able to achieve mostly pixel-perfect results but it may need to some tweaking.
Oh. It is 5724x2041. I must admit, that is a bit larger than what is required xD. I took it to full scale and divided it by 5. So the scaling is correct, but whenever I apply a margin of 0.2, it gets like this. Only not messed up margin value was 0, 0.5 and 1. I couldn’t see any major difference between them too.
Sir, frankly I have no idea what I am doing, but the canvas size is 720p. And yes, 0.45 seemed to work fine. Before you mentioned it, I didn’t know about 9-slice. So I’ll now proceed to watching youtube videos about it. Thanks for informing me about it.
Oh and, image is still as not crisp as the original texture. There are still some jagged lines.
These, right? This has something to do with export / import settings, most likely. Or compression. Start by setting the image compression to UI after importing:
Thanks for your replies. After getting correct resolutions for images and using 9-slice,
there aren’t any more problems. It appears the solution wasn’t as complex as I thought.