![](https://i-blog.csdnimg.cn/blog_migrate/66050c2ddb1c8fa621f7e3e98f5bc68a.png)
unity 完美像素
11/2018 Update: We now have a Pixel Perfect package that solves this issue! Learn more & get it here.
11/2018更新:我们现在有一个Pixel Perfect软件包可以解决这个问题! 了解更多并在此处获取。
如何制作外观精美的像素艺术游戏? 我们经常听到这个问题。 如果您使用Unity中所有默认设置启动像素游戏,那就太糟糕了! 但是可以将当前版本的Unity渲染成不会吸引人的像素化游戏。 请继续阅读以了解执行和不执行的内容。 (How do I make a pixel art game that looks great? We get that question a lot. If you start your pixel game with all the default settings in Unity, it will look terrible! But the current version of Unity can be made to render pixelated games that don’t suck. Read on for a rundown of do’s and dont’s.)
![goodbad](https://i-blog.csdnimg.cn/blog_migrate/1d1eac8a8912b51dd0ed0387ea9715ca.png)
Image on the left is rendered on a poorly calibrated camera while the one on the right is properly calibrated. (click on image to see full-res)
左侧的图像在校准不良的相机上渲染,而右侧的图像则经过正确校准。 (点击图片可查看全图)
秘制酱 (The Secret Sauce)
The secret to making your pixelated game look nice is to ensure that your sprite is rendered on a nice pixel boundary. In other words, ensure that each pixel of your sprite is rendered on one screen pixel (or any other round number). The trick to achieving this result is tweaking the camera’s orthographic size (and live with the consequences).
使您的像素化游戏看起来不错的秘诀是确保您的精灵在漂亮的像素边界上渲染 。 换句话说,请确保精灵的每个像素都呈现在一个屏幕像素(或任何其他整数)上。 实现此结果的技巧是调整相机的正射影像尺寸(并承担后果)。
<