Window scaling not working properly with PixelArt?

Godot Version 4.2.2

I’m learning Godot and draw my stuff in PixelArt. I looked at some tutorials for scaling and at the docs and can’t figer out the solution to my problem.

Problem: My Base Viewport Size is 640x360, so I thought with integer scaling it would scale up perfectly to 1920x 1080 Fullscreen (because 1920 x 1080 / 3 is 640x360). But when I try it out its a smaller window with black edges. (It looks like 1280 x 720)

Here’s my settings:( My Window Override is set to 1920 x 1080)

Unfortunaly I can’t add the image of the game because of 1 media restriction. But as i said, the window is 1920 x 1080 but the actual view is smaller and the rest is filled with black.

Does anybody know why this happens or has the same issue? :slight_smile:
Or is there a better way to scale Pixelart?

1 Like

you might be able to add more image here as a reply

@pham150603 You’re right. Here is what the game window looks like if i start:

how did you scale your game?

@pham150603 it should scale automatically with the settings above, as far as i understand. Which it does… but somehow only up to 1280x720, not the wanted 1920x1080

Set the scale mode from integer to fractional it should work as you expected

i understood that i need integer scaling because pixel art becomes blurry when scaled with a fractional number

In my experience, your screen can’t be 1080 because of the taskbar so it gets a bit shorter (might be 1060) therefore when you set it to integer mode it falls back to (1280x720)

You could also setup a zoom factor for the camera to guarantee that the projection relates to an even number of pixels. Then you don’t have to rely on the integer scaling mode and just do fractional.

how would I do that, could you explain more please?

See this post Using a Shader while Upsampling Viewport to Window Size - #2 by pennyloafers

1 Like

I am using a shader now and with fractional scaling the pixel art still looks good I think. Thank you for the help

At least for Godot I don’t think it will blur pixel games. with the other post I mentioned, there is a n issue called pixel wobble where the logical pixel size can actually change size at a degree relative to your physical screen pixels spacing. It may become noticable when moving or scaling canvas items.

I don’t know how well one of my approaches, from that post, handles movement in this case.