6
\$\begingroup\$

I have a project that was started in Unity 5.5. When I open it in 5.6, most 2D graphics look like they're not anti-aliased: left is 5.6, right is 5.5

What you see there are UI Images in a Canvas. The weird thing is that the red cross image looks OK, but the card with the red outline doesn't.

I've tried setting mipmaps to true, and Anti-aliasing set to 8x or 4x, with no difference. I hoped this was only in the editor, but a build shows the same jaggies.

Has some setting changed in 5.6 that I can edit so my graphics look anti-aliased again, or is this a bug?

\$\endgroup\$
3
  • \$\begingroup\$ Do your textures in your Assets folder have "Generate Mip Maps" enabled? (select texture > Inspector tab > Advanced) \$\endgroup\$ Apr 6, 2017 at 7:35
  • \$\begingroup\$ @ChrisMcFarland I've tried that and that didn't seem to help. \$\endgroup\$ Apr 6, 2017 at 7:40
  • \$\begingroup\$ Re-import your textures. Make sure you have the filtering set properly in your texture import settings as well. \$\endgroup\$
    – jgallant
    Apr 6, 2017 at 9:54

2 Answers 2

9
\$\begingroup\$

I've filed a bug report with Unity #898863 and they've confirmed it. So they broke it, and are going to fix it hopefully NOT going to fix it. Below is an explanation given to me by Unity QA:

Thanks for raising this issue. In unity 5.6 we made a change to how the backbuffer / msaa / hdr works. A side effect of this is that the backbuffer is never created with MSAA enabled, we go via an intermediate render texture. In the example you have sent the canvas is set to 'screen space overlay'. This means that is renders directly into the 'final' buffer (in this case the framebuffer).

The normal scene camera is set to have MSAA enabled, if you change the camera mode to Screen Space - Camera and render them into the camera (last step via sorting layers), then MSAA will work as they will not be rendered direct into the backbuffer but into the intermediate render texture.

\$\endgroup\$
6
\$\begingroup\$

I've been playing with this, and you can still achieve smooth edges in the UI without anti-aliasing. The trick is to make sure texture filtering smooths out the sides.

Enabling mip-maps gets you half way there, but the other half of it is to make sure that sides you want smoothed are bordered by alpha transparency. The outer edge of everything you want smooth must be transparent.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .