美文网首页
UI抗锯齿不生效原因

UI抗锯齿不生效原因

作者: 胡萝卜啊啊啊 | 来源:发表于2019-05-27 19:22 被阅读0次

不管是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中。

image

所以解决办法就是使用Screen Space-Camera的方式。

除了开抗锯齿之外,如果图片是静态的,就是不会旋转的。只是这个角度,不想开MASS可以考虑让UI直接出图成斜的,OverDraw高一些,不过不用抗锯齿了。

另外建议题主关注下开了抗锯齿之后的字体效果,有可能没有那么“锐利”了。

相关文章

  • UI抗锯齿不生效原因

    不管是UGUI还是NGUI,只要控制的UI设置了旋转,边缘就有明显的锯齿。设置里打开8倍抗锯齿也没效果。看了网易的...

  • 2019-12-12

    element-ui首次进入页面css不生效,重新刷新才生效的问题。 页面中没有使用...

  • notifyDataSetChanged不生效原因

    很多时候我们在listview中的数据变化的时候需要动态更新listView而使用notifyDataSetCha...

  • eslintignore不生效原因

    最近项目挪了目录,发现原来的.eslintignore不生效了解决方案就是在settings.json里面添加 我...

  • vue devServer不生效原因

    1.前端调用的api接口为匹配 2.接口服务器对应端口未启用

  • OpenGL学习笔记四

    抗锯齿 抗锯齿混合的2大功能:颜色组合、抗锯齿 多重采样 多重采样,抗锯齿混合综合使用 OpenGL 数学库; M...

  • 2020-02-22 Paint图片绘制抗锯齿设置

    1.普通抗锯齿 2.图片抗锯齿

  • css 样式不生效的原因

    不生效的原因 选择器写错语法错误选择器路径有误 出现很多这种状况,怕路径出错,就复制路径,一不小心就复制多了一个选...

  • vscode中eslint不生效原因

    检查是否配置以下内容 package.json中是否配置了eslint依赖1.png 工程目录下是否有.eslin...

  • Mysql配置不生效的原因

    今天遇到一个问题,很简单的,就是需要调整back_log和max_connections两个值。 在/etc/my...

网友评论

      本文标题:UI抗锯齿不生效原因

      本文链接:https://www.haomeiwen.com/subject/majktctx.html