Pixels in pixel art are not even

Godot Version

4.3

Question

Hello, I’ve noticed something strange in how pixels are being rendered in my 2D game in Godot. When I am in the scene every pixel is normal like how it’s suppose to be but when I run the project each pixel goes either wide and short or thin and long.
When I am in scene and not running:
PerfectWhenNotPlaying
When I am running the project:
PixelArtNotWorking
As you can see, when I am running the pixels become uneven. Here are my window settings:
Viewport Width: 250
Viewport Height: 500
Mode: Fullscreen
Mode: viewport
Aspect: expand
Orientation: portrait
Any setting i didnt mention in the window tab is on the default setting. Any help would be greatly appreciated. Thanks in advance!

Is object position is integer?(1, 2, 3 not 1.5, 1.6 etc.)
Also for pixel art games you need to change texture filter from linear to nearest.

The sprite2D’s position is (0, 0) and the filter is already at Nearest.

Having the sprite Offset set to Centered==True can muck with the pixels.

I set Centered to false and it is still the same problem.

Set the mode to Canvas Items instead of Viewport

1 Like

After further research, it seems like setting the camera zoom any number less than 5 distorts the image when set to viewport mode. When set to canvas items, it fixes the distortion. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.