Closed Plombo closed 3 months ago
@Plombo I have a question about this. Will this high-quality scaling be optional or it will always works like that? Plus, OpenGL will be the defaut backend?
Because this raised many concerns to me.
OpenGL has been the default backend for a long time, and its high-quality scaling support has been there for just as long. This just makes it so that Windows doesn't do its own upscaling on top of ours.
I see. Will the neareast neighbor scale still be available?
I can confirm these changes are compatible with MacOS.
The way it's worked for a while (not changed by this pull request) is that high quality is the only option for OpenGL, while the SDL backend has the old nearest-neighbor and linear filters. Also, to clear up any confusion, this is what the high-quality scaling actually produces:
So pixels stay sharp (not blurred like with linear filtering), but there is no issue with uneven scaling at non-integer factors (like with nearest-neighbor filtering).
Oh, great! for a second I was worried about it
One problem is that contrary to what I thought initially, high-DPI support on Windows has to be turned on or off before SDL_Init, so we can't disable it for the SDL (non-OpenGL) video backend there. This will make the SDL backend look janky in windowed mode, but at least it's non-default and there's no real benefit to using it these days.
The above issue is Windows-only; we can still be toggle high-DPI support per-backend everywhere else (Linux/Wayland and Mac), so the SDL backend will still look okay there.
And even on Windows, this change is still an overall improvement. Having a default backend with properly sharp pixels and a non-default janky backend is an improvement over the status quo of two blurry ones.
"This will make the SDL backend look janky in windowed mode, but at least it's non-default and there's no real benefit to using it these days." this is exaclty what I use :(
Why do you use it over the OpenGL backend? Does it provide some benefit?
Regardless of high-DPI support, the SDL backend has always been janky in fullscreen mode for similar reasons (uneven scaling factor).
This produces better results than the windowing system's scaling on top of our own, since we can do high-quality scaling in the OpenGL backend.
Works with Windows and Wayland, and should work for Mac as well.