Why Your Pixel Art Looks Blurry In-Engine
Pixel art blurry in Godot, Unity or GameMaker? Turn off linear filtering, scale by whole numbers, skip compression and snap to pixels. Settings for each.
Your pixel art looks crisp in the image editor. In the game it looks soft, smeared, or unevenly chunky, with some pixels wider than others. The art is fine. The engine is resampling it.
Pixel art gets blurry in-engine for four reasons, in this order of likelihood: linear texture filtering is on (it is the default in most engines), the game is being scaled by a non-integer factor like 2.13x, sprites or the camera sit at sub-pixel positions, or the texture was compressed or downscaled on import. The fix is to set the filter to nearest or point, scale the game by whole numbers only, snap to pixels, and import the art uncompressed at full size.
Here is each cause, then the exact settings in Godot 4, Unity and GameMaker.
The four causes
| Cause | What it looks like | Fix |
|---|---|---|
| Linear (bilinear) filtering | Soft, blurred edges everywhere | Nearest or Point filtering |
| Non-integer scaling | Uneven pixels: some columns 2 px wide, some 3 px | Integer scale factor, letterbox the rest |
| Sub-pixel positions | Shimmer or wobble while moving; edges blur on some frames | Snap transforms or the camera to pixels |
| Compression or downscaling on import | Muddy colors, blocky smears, lost single-pixel details | No compression, Max Size at or above the texture size |
Mipmaps are a fifth, smaller cause. They only matter if the camera zooms out, which is covered under Godot below.
Cause 1: linear filtering
When a texture is drawn at any size other than exactly 1:1, the GPU has to decide what color each screen pixel gets. Linear (bilinear) filtering blends the nearest four texture pixels. For painted art that looks smooth. For pixel art it smears every hard edge. Nearest (Point in Unity) picks the single closest texture pixel, so edges stay hard.
Engine defaults favor smooth art:
- Godot's project-wide default canvas texture filter is Linear.
- Unity's sprite import settings offer Point (no filter), Bilinear and Trilinear. Unity's docs describe Point as blocky up close and Bilinear as blurry up close.
- GameMaker's Interpolate colours between pixels option turns on linear interpolation, which the manual says "smooths" pixels and is on by default.
Cause 2: non-integer scaling
Even with nearest filtering, a 640 x 360 game stretched to a 1366 x 768 window is scaled by about 2.13. Screens cannot show fractions of pixels, so some art pixels become 2 screen pixels wide and some become 3. Godot's multiple resolutions documentation uses this exact example to show why pixel art looks uneven with fractional scaling.
The fix is to pick a base resolution that divides evenly into your target screens, and to let the engine scale only by whole numbers.
| Base resolution | 1280 x 720 | 1920 x 1080 | 2560 x 1440 | 3840 x 2160 |
|---|---|---|---|---|
| 320 x 180 | 4x | 6x | 8x | 12x |
| 384 x 216 | 3.33x | 5x | 6.67x | 10x |
| 480 x 270 | 2.67x | 4x | 5.33x | 8x |
| 640 x 360 | 2x | 3x | 4x | 6x |
640 x 360 and 320 x 180 hit a whole number at every common 16:9 resolution. Godot's docs recommend 640 x 360 as a baseline for that reason. On screens that do not divide evenly, integer scaling adds black bars instead of distorting pixels.
The same rule applies inside the game. A sprite scaled to 1.5, or a camera zoom of 1.5, reintroduces uneven pixels. Keep sprite scale and camera zoom at whole numbers, or draw the art at the size you want to show it. If you are deciding how large to draw in the first place, pixels per unit, explained covers the world-scale side and background resolution and file size covers backgrounds.
Cause 3: sub-pixel positions
If a sprite sits at x = 100.5, half of each art pixel lands on one screen pixel and half on the next. With nearest filtering, that shows as shimmer or wobble as things move; with linear filtering, as blur.
Two common sources:
- Smooth movement and camera smoothing put objects at fractional positions every frame.
- Centering an odd-sized sprite. A sprite 119 px wide, centered on a whole-pixel position, has its edges on half pixels. Godot's class reference warns that pixel art textures may appear deformed when centered for this reason. Use even dimensions, turn off centering, or snap. Sprite pivot points covers where the origin should go.
Cause 4: compression and downscaling
GPU texture compression saves memory by approximating blocks of pixels. On pixel art, where single pixels carry detail, it produces muddy colors and blocky smears.
- Godot imports 2D images as Lossless by default, which the docs describe as the recommended setting for pixel art. VRAM Compressed should be avoided for 2D because it shows noticeable artifacts, especially on low-resolution textures.
- Unity applies compression through the Compression field (None, Low Quality, Normal Quality, High Quality). Set it to None for pixel art. Also check Max Size: if the texture is larger than Max Size, Unity downscales it on import, by default with the Mitchell algorithm, which blurs pixel art.
Watch for blur introduced before the engine too. Resizing pixel art in an image editor with a smooth resampling mode bakes the blur into the file. Resize with nearest neighbor, or not at all.
Godot 4 settings
- Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter: set to Nearest. Every
CanvasItemuses its owntexture_filterproperty, and the default value, Parent Node, inherits from its parent, so this project setting flows down to everything. - Display > Window > Size: set the viewport width and height to your base resolution, for example 640 x 360.
- Display > Window > Stretch > Mode: viewport. The docs recommend it for pixel art: the scene renders at the base size, then scales to the window. (Projects created in Godot 4.7 default to
canvas_itemsand theexpandaspect, so change this on new projects.) - Display > Window > Stretch > Scale Mode: integer, available since Godot 4.2. The scale factor is floored to a whole number.
- Display > Window > Stretch > Aspect: keep for one fixed aspect ratio with bars, or expand to show more of the world on wider screens.
- Rendering > 2D > Snap > Snap 2D Transforms to Pixel: on, for low-resolution games. The docs advise against enabling the vertex snap setting at the same time.
- Import settings on each texture: Compress Mode Lossless, mipmaps off unless the camera zooms out. If it does, use Nearest Mipmap filtering on those nodes.
Unity settings
- Texture import settings for each sprite: Filter Mode Point (no filter), Compression None, Max Size at or above the texture's largest dimension. Apply.
- Same Pixels Per Unit on every sprite.
- Add a Pixel Perfect Camera to the camera. Set Asset Pixels Per Unit to match your sprites, Reference Resolution to your base resolution (for example 320 x 180), and choose a Grid Snapping option: Pixel Snapping aligns sprites to the pixel grid; Upscale Render Texture renders at the reference resolution and scales the result up.
- Crop Frame: Pillarbox, Letterbox or Windowbox if you want bars instead of uneven scaling.
- Pivots in pixels: set Pivot Unit Mode to Pixels in the Sprite Editor so pivots land on whole pixels.
- Editor snapping: set the Move snap to 1 divided by your PPU, so placed objects sit on whole pixels.
GameMaker settings
- Game Options > (your platform) > Graphics: uncheck Interpolate colours between pixels. It is on by default and turns on linear interpolation.
- At runtime, the
gpu_set_texfilter()function controls texture interpolation from code, if you need to switch it during play. Check its manual page for the exact arguments on your GameMaker version. - Camera and viewport: make the viewport size a whole-number multiple of the camera size (for example a 320 x 180 camera in a 1280 x 720 viewport).
- Window scaling: scale the application surface or window by whole numbers, and add bars on screens that do not divide evenly.
- Positions: round draw positions, or the camera's position, to whole pixels if movement shimmers.
Doing this in Makko
The cleanest pixels come from art that reaches the engine at the size you will show it. In Art Studio, the sprite editor resamples frames and bakes them into a sprite sheet, so you can prepare the sheet before export rather than scaling it in the engine. In Code Studio, the Asset Manager right-sizes characters against a reference animation, which keeps a cast at one pixel scale. With art at a consistent scale, the engine settings above only have to deal with whole-number scaling. For how sheets should be exported per engine, see sprite sheet formats by engine.
FAQ
Why is my pixel art blurry in Godot?
Godot's default canvas texture filter is Linear. Set Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest. If pixels are uneven rather than blurry, also set the stretch mode to viewport and the stretch scale mode to integer.
How do I stop pixel art blurring in Unity?
In each sprite's import settings, set Filter Mode to Point (no filter) and Compression to None, and make sure Max Size is at least the texture's size. Then add a Pixel Perfect Camera with Asset Pixels Per Unit matching your sprites.
Why are some of my pixels bigger than others?
The game is being scaled by a non-integer factor, such as 640 x 360 stretched to 1366 x 768. Use integer scaling so every art pixel becomes the same whole number of screen pixels, and accept black bars on screens that do not divide evenly.
What resolution should a pixel art game use?
Choose a base resolution that scales by whole numbers to common screens. 640 x 360 scales 2x to 720p, 3x to 1080p, 4x to 1440p and 6x to 4K; 320 x 180 scales 4x, 6x, 8x and 12x.
How do I fix blurry pixel art in GameMaker?
Uncheck Interpolate colours between pixels in the Graphics section of your platform's Game Options, which is on by default. Then keep the camera-to-viewport scale a whole number.