Version: Unity 6.5 (6000.5)
Language : English
Configure a pixel perfect camera
3D GameObjects in 2D URP scenes

Pixel Perfect Camera component reference for URP

Explore the properties you can use to automatically adjust the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
to scale and rotate pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
art precisely in the Universal Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
(URP).

Important: The pixel perfect camera is included by default when you set up a project for 2D games with the Universal 2D template. Don’t install the separate 2D Pixel Perfect package, which works only with the Built-In Render Pipeline.

For more information, refer to Add a pixel perfect camera and Configure a pixel perfect camera.

Property Description
Asset Pixels Per Unit Sets how many pixels of width and height in the spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
image correspond to one unit in world space. Set this value to match the Pixels Per Unit values of all the sprites in the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
.
Reference Resolution Sets the screen resolution your sprites are designed for. For example, if you set X to 320 and Y to 180, Unity sets the camera view to 320 sprite pixels in width and 180 sprite pixels in height.
Crop Frame Crops the viewport with black bars to hide the areas beyond the aspect ratio of the Reference Resolution. The options are:
  • None: Doesn’t crop.
  • Pillarbox: Crops the viewport vertically, using black bars on the left and right to match the width of the Reference Resolution.
  • Letterbox: Crops the viewport horizontally, using black bars at the top and bottom to match the height of the Reference Resolution.
  • Windowbox: Crops the viewport both vertically and horizontally, using black bars on all sides to match the Reference Resolution.
  • Stretch Fill: Stretches the camera view to fill the viewport.
For more information, refer to Configure a pixel perfect camera.
Grid Snapping Sets how Unity snaps and scales sprites. The options are:
  • None: Doesn’t align or upscale.
  • Pixel Snapping: Renders sprites so they align to the pixel grid, which prevents sprites moving between pixels. The Transform position of sprites isn’t affected.
  • Upscale Render Texture: Renders the scene to a temporary texture with a resolution that matches Reference Resolution, or larger if the viewport has a wider or taller aspect ratio. Unity then upscales the temporary texture to the viewport size. This approach results in unaliased and unrotated pixels. For more information, refer to Configure a pixel perfect camera.
Filter Mode Sets how Unity stretches the camera view when you set Crop Frame to Stretch Fill. The options are:
  • Point: Stretches the camera view using point filtering, which keeps pixels sharp but can result in shimmering.
  • Retro AA: Stretches the camera view using bilinear filtering, which can make the edges of pixels blurrier but reduces shimmer.
For more information, refer to Configure a pixel perfect camera.
Current Pixel Ratio The ratio of the sprites in the Game view to their original size. For example, 2:1 means the sprites are twice their original size.

Additional resources

Configure a pixel perfect camera
3D GameObjects in 2D URP scenes