Resolution/DPI/UI Blurry, not working as expected.

Godot Version

v4.5.1.stable.mono.offical [f62fdbde1]

Question

I’m trying to recreate a game client I have been working on that is written in C with SDL, into a Godot game. I’m struggling with understanding how to properly configure Godot to work similarly to my client.

My Client currently boots up a resizable 1280x720 SDL window, I draw EVERYTHING to a 1280x720 VBO, that I then scale up to whatever the window size is. I also use IMGUI for most UI elements.

In my understanding of Godot I have configured my project to use a base resolution of 1280x720. With stretch mode set to viewport, aspect expand (which mirrors how I determine what scale to use in SDL), 1.0 scale, Scale Mode integer and I have made the default Texture Filter nearest.

The first issue I had was 1280x720 game window appears incredibly small, I got past that by using the override to force it to 1920x1080 (which I swear is actually making it render at 1280x720). My game works mostly fine, but I have been having issues with my fonts. As I went to type this all out and get a screenshot, my fonts look mostly fine today. Despite nothing having changed in the project or the code.

So I guess this has mostly turned into a, what could I be doing better. If all the assets for this game are currently drawn at 1280x720 as the reference size, how can I make it reliably run at 1280, and scale without the font text becoming a disaster. I worry I missed something with how resolution/aspect/scale are all supposed to play together. The game is 8bit not pixel art per say, but the fonts are pixel fonts.

First make sure that you read this: Multiple resolutions — Godot Engine (stable) documentation in English

This will render your whole scene and then scale it up to a higher resolution, which results in blurry fonts.

Try setting your stretch mode to canvas_items and put your UI inside a canvas layer. That will scale your controls nice and smooth.

I swear I had tried this, but did this last night and it made a huge difference. Things are looking good small and big. If I have a scene that is all UI, do I need to make the root a canvas layer? Should I?

I’m not sure if you need to but I think if you have a bigger project and want to be able to use different resolutions then it is recommended. Probably best to just try.