不管是UGUI还是NGUI,只要控制的UI设置了旋转,边缘就有明显的锯齿。设置里打开8倍抗锯齿也没效果。看了网易的《非人学园》里面的界面,很多应该也是旋转的,并没有锯齿。
微信图片_20190527192131.jpg
https://gamedev.stackexchange.com/questions/139626/is-ui-anti-aliasing-broken-in-unity-5-6
“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.”
意思是,如果你的Canvas选择的是默认的ScreenSpace-Overlay,那么就不会走MSAA的那个buffer,而是直接写入到“final” buffer中。
所以解决办法就是使用Screen Space-Camera的方式。
除了开抗锯齿之外,如果图片是静态的,就是不会旋转的。只是这个角度,不想开MASS可以考虑让UI直接出图成斜的,OverDraw高一些,不过不用抗锯齿了。
另外建议题主关注下开了抗锯齿之后的字体效果,有可能没有那么“锐利”了。









网友评论