Resolution Issues

Godot Version

godot-4.4

Question

I have code to post but first kind of wanted to see if there were any recommendations that are simpler than the implementation of resolution were working with. I didn’t write the code myself, my cousin working on the project with me did, but I think I can explain the issues fairly well.

Were running the project at a base resolution of 640x360 and scaling to higher resolutions, we tried through integer scaling just built into godot, but for some reason the scaling was off and there were massive black borders around the entire screen above 1080p, and the borders were exactly the size difference to the borders from 1080p on a 1440p monitor. We switched to fractional scaling and it mostly works but now in windowed mode we run into issues in both bordered and borderless, for bordered it doesn’t correctly display the window borders at 1440p, even though it does work for 4k, and if we toggle between borderless and bordered it does show the window border in 1440p, but I can only describe it as looking like its from windows xp. The project works and scales perfectly in fullscreen, but even in borderless windowed it doesnt scale to the edges of the screen, the window is cut off at the bottom and sides and we can see desktop underneath. There are more issues but those are the major ones.

After looking at the code I personally think it just needs a rewrite, and he kind of agrees because he was up very late doing it a few nights ago and doesn’t remember how it works himself. I just don’t know how to go about that or if there are built in options were missing and we don’t need code at all for this. Essentially we just want perfect pixel scaling from a base resolution of 640x360 to normal resolutions and are having a ton of issues with the scaling past 1080p specifically in windowed and borderless windowed. I would like integer scaling as I’ve heard of some benefits it has but if its only feasible with fractional or I’ve heard wrong and fractional is better that’s fine too. Just looking for any and all help we can get at this point lol, Thanks in advance!

I forgot to mention integer did work past 1080p but only in exclusive fullscreen and not fullscreen, I’ve heard that’s common but figured I would ask just in case.

Hi, have you read this page yet? There is also some info on the Window node page.

Anyway I think this is the relevant portion.

Games should use the Exclusive Fullscreen window mode, as opposed to Fullscreen which is designed to prevent Windows from automatically treating the window as if it was exclusive fullscreen.

Fullscreen is meant to be used by GUI applications that want to use per-pixel transparency without a risk of having it disabled by the OS. It achieves this by leaving a 1-pixel line at the bottom of the screen. By contrast, Exclusive Fullscreen uses the actual screen size and allows Windows to reduce jitter and input lag for fullscreen games.

When using integer scaling, this is particularly important as the 1-pixel height reduction from the Fullscreen mode can cause integer scaling to use a smaller scale factor than expected.

So in fullscreen (non exclusive) the window is actually 1439 pixels tall and integer scaling will not scale the game by x4.

Alright so we got scaling working, thank you. Did want to ask about another issue switching between borderless and bordered, if we do that at the resolution of the monitor(in my case 1440p but verified at 1080 and 4k) a blue border appears and stays no matter what until closing. Not sure whats causing it.

Sorry, I can’t see a blue border on the image.

Its across the top probably hard to see ill attach a screenshot of just that part
Screenshot 2025-03-21 212400

it looks almost like a windows 7 border I dont know if that helps