PixelPerfect
Pairs with a Camera to keep every game pixel the same size on screen, so pixel art stays crisp instead of shimmering as the camera moves or zooms.
On this page
Add it
+ Add node → Pixel Perfect Camera creates a node with it already on. Already have a node for it? Add component → PixelPerfectComponent.
From a script
A script on the same node writes these fields by name. PixelPerfectComponent is the name to pass.
rgs
set_number("PixelPerfectComponent", "pixels_per_unit", 1.0);
set_flag("PixelPerfectComponent", "upscale_render_texture", false);
set_flag("PixelPerfectComponent", "crop", false); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Assets PPU | pixels_per_unit | number, 1 to 512 | 1 | Art pixels per world unit. 1 when sprites are sized in pixels, as they are in Rengy. |
| Reference Width | reference_width | number, at least 1 | 320 | How wide the game is meant to be, in game pixels. |
| Reference Height | reference_height | number, at least 1 | 180 | How tall the game is meant to be, in game pixels. |
| Upscale Render Texture | upscale_render_texture | checkbox | off | Render at the reference size and scale up once; fixes rotated sprites and particles too. |
| Crop Frame | crop | checkbox | off | Letterbox to the exact reference aspect instead of showing more world. |