Version: Unity 6.5 (6000.5)
Language : English
Add a pixel perfect camera
Pixel Perfect Camera component reference for URP

Configure a pixel perfect camera

Adjust the viewport in the Game view after you add a pixel perfect camera to your scene.

Crop the scene

Use the Crop Frame property of the Pixel Perfect Camera component to crop the viewport in the Game view. Use this property if the aspect ratio of the Game view makes it wider or taller than the Reference Resolution you set in the Pixel Perfect Camera component.

For more information, refer to Pixel Perfect Camera component reference.

An image of a 2D character, with Crop Frame set to None, Pillarbox, Letterbox, Windowbox, and Stretch Fill.
An image of a 2D character, with Crop Frame set to None, Pillarbox, Letterbox, Windowbox, and Stretch Fill.

Make pixels sharper

By default, the Filter Mode of a Pixel Perfect Camera component is set to Retro AA, which prevents sprites shimmering when they move, but can make pixels look blurry.

To make pixels sharper but increase shimmering, set the Filter Mode to Point.

An image of a 2D character rotated 45 degrees. On the left, Filter Mode is set to Point. On the right, Filter Mode is set to Retro AA.
An image of a 2D character rotated 45 degrees. On the left, Filter Mode is set to Point. On the right, Filter Mode is set to Retro AA.

Rotate with upright pixels

By default, Unity renders at the full resolution of the viewport in the Game view. As a result, when you rotate sprites, the sprite pixels rotate at high resolution and create smooth diagonal lines. To keep pixels upright instead, set the Grid Snapping property of the Pixel Perfect Camera component to Upscale Render Texture.

A crate sprite with 16 x 16 pixels. With Grid Snapping set to None, Unity renders high-resolution diagonal lines when the pixels rotate 45 degrees. With Grid Snapping set to Upscale Render Texture, Unity renders diagonal lines at the original 16 x 16 resolution, and the pixels stay upright and square.
A crate sprite with 16 x 16 pixels. With Grid Snapping set to None, Unity renders high-resolution diagonal lines when the pixels rotate 45 degrees. With Grid Snapping set to Upscale Render Texture, Unity renders diagonal lines at the original 16 x 16 resolution, and the pixels stay upright and square.

Additional resources

Add a pixel perfect camera
Pixel Perfect Camera component reference for URP