How to get scaling to work properly in fullscreen

With integer scaling, your viewport can be 1280×960, 2560×1920 and so on. It can’t be any intermediate size. This is why you see black bars appear on all sides. A lot of modern pixel art games use a 640×360 viewport as it covers a lot of common screen resolutions with integer scaling (720p, 1080p, 1440p and 2160p are all covered).

1280×960 is a very large viewport size for a pixel art game, as it won’t be able to fit on the Steam Deck which is 1280×800.

If you want to use the full screen while using integer scaling, you need to adjust the viewport size according to the window size. This can be done using a script, but keep in mind doing this will affect the viewable game area (i.e. people might be able to see more of the game world depending on their window size).

If you want pixel art to look reasonably sharp while not being distorted, you can use a sharp bilinear filter while using fractional scaling. It won’t be as sharp as integer scaling though.

Did you use the Exclusive Fullscreen mode while testing this? Try running the Multiple Resolutions demo project to see for yourself how it can work.

2 Likes