![]() ![]() In your project's quality settings: set " Full res" in Texture quality and disable Anti-Aliasing for the platform you are targeting.Make sure that the player settings of the platform(s) you are targeting don't reduce the texture size.All your textures should have the same Pixels Per Unit.The textures of your sprites should use: point filtering, disable mip-mapping, compression to "none" (Truecolor format in older Unity versions).Use an orthographic camera and throw the Pixel Perfect Camera script on it.If you want to enable the pixel-perfect mode, make sure that your project has the following set-up: If you want to use the pixel snap functionality, you'll have to use the pixelSnap script on every sprite. You can watch this video for more information. ![]() So, sprite scaling and rotating should probably not be used.Ĭreate an orthographic camera and use the script on it. Note that if you change the scale of your sprite or you rotate it, you won't get the blocky result you may expect. Thus, when a sprite is translated, it will move multiple screen pixels at once in order to snap to the artwork's pixel grid. If you enable retroSnap, each sprite will snap in the asset's pixel grid. You can read more about the rational in my blog post. The script makes sure that each sprite pixel gets rendered in an integer amount of screen pixels. The only thing it does is that it adjusts the camera's orthographic size. In contrast to other camera solutions, this script uses a very simple way (which will most probably not have any side-effects in your project) to achieve pixel perfection. Retro snap:enabling pixel snapping makes sprites snap to the artwork's pixel grid producing a snappy retro motion. The script will choose a camera size that respects all constraints. This is useful if for example the user has an ultra wide monitor and you don't want your camera's width to be wider than some amount. Size constraints: you can optionally set the maximum allowed camera width or height. This is very important when you render pixel art using "point sampling".Ĭamera width: specify the camera width instead of height (the default Unity camera allows you to set only the camera height). Pixel perfect: adjusts the camera size so that each sprite pixel is rendered to an integer number of screen pixels. It's a camera script which gives more control over the camera size and enables pixel perfect rendering for pixel art sprites. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |