且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

编辑器中的Unity模糊和像素化精灵(无像素图稿)

更新时间:2023-02-02 10:05:29

因为缩放

您要在图像上显示的分辨率不是显示这些图像的256x256区域,这意味着它们 必须 必须以某种方式缩放 以便在所需区域中显示. 众所周知,相机渲染在缩放方面很糟糕.由于您的图像不是矢量(而且Unity也不支持矢量图形格式),因此缩放总是会导致细节丢失.像硬边一样的细节.

Because scaling

You're display resolution on the images isn't a 256x256 region where those images are displayed, which means that they must be scaled in some manner in order to display in the desired region. Camera rendering is notoriously bad at scaling. As your images aren't Vector (and Unity doesn't support vector graphic formats anyway), scaling will always result in a loss of detail. Detail like hard edges.

您的选择是:

  • 较小的图像,可以完全控制图像的缩放比例
  • 双线性过滤(本质上是模糊的)
  • mipmaps(以2的幂次自动缩小图像的版本)

如果后两个结果不能令人满意,则您唯一的选择是第一个.

If the later two aren't giving satisfactory results, your only option is the first.