You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1060 with Max-Q Design
Issue description
I have two screens:
my laptop's one, 1920x1080, 120 DPI, 125% Windows scale
and an external one, 1920x1080, 96 DPI, 100% Windows scale
I work on a 2D pixel perfect game. When I display it fullscreen on my laptop everything is nice and sharp, but not on the external screen where I have scaling issues (the pixel art is altered). I logged the screen resolution according to Godot and I got this:
laptop: 1920x1080
external: 2400x1350 (which is 125% of 1920x1080...)
I tried to disable the "allow_hidpi" settings, then I got this:
laptop: 1536x864 (125% of this gives 1920x1080...)
external: 1920x1080
Finally I put back the "allow_hidpi" settings and disabled the 125% scaling in windows settings:
laptop: 1920x1080
external: 1920x1080
As I understand these results I'd say that Godot is handling well the Windows scaling through the "allow_hidpi" setting, but is failign to handle correctly the case where the two screens have a different scaling value in the Windows settings. I expected Godot to use a 1920x1080 resolution for the two screens in this case.
Steps to reproduce
Have two screens with a same resolution
Give screen 1 a 125% scaling in Windows settings
Give screen 2 a 100% scaling in Windows settings
Launch any Godot scene and print "DisplayServer.screen_get_size()"
Move the window to a screen to another and notice the displayed value changes.
Godot doesn't use the Windows per-monitor DPI awareness API yet, as per #56341. This limits its ability to scale to multi-monitor setups with different scale factors.
Please upload a minimal reproduction project1 to make this easier to troubleshoot.
Which stretch mode does the project use? I suggest using 4.2.beta5 and setting the scale stretch policy in the project settings to Integer (this is a new setting in 4.2.beta). This ensures the viewport is always scaled at an integer scale.
Footnotes
A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.
Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available. ↩
I suggest using 4.2.beta5 and setting the scale stretch policy in the project settings to Integer (this is a new setting in 4.2.beta). This ensures the viewport is always scaled at an integer scale.
I just checked with 4.2.beta5, it's worth mentionning that with this version the issue occurs on my internal monitor (while it was on the external one with 4.1.2). Nonetheless with the integer scaling option it's better, but the viewport cover only a fraction of the display (since a wrong screen resolution is used).
Godot version
4.1.2.stable
System information
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1060 with Max-Q Design
Issue description
I have two screens:
I work on a 2D pixel perfect game. When I display it fullscreen on my laptop everything is nice and sharp, but not on the external screen where I have scaling issues (the pixel art is altered). I logged the screen resolution according to Godot and I got this:
I tried to disable the "allow_hidpi" settings, then I got this:
Finally I put back the "allow_hidpi" settings and disabled the 125% scaling in windows settings:
As I understand these results I'd say that Godot is handling well the Windows scaling through the "allow_hidpi" setting, but is failign to handle correctly the case where the two screens have a different scaling value in the Windows settings. I expected Godot to use a 1920x1080 resolution for the two screens in this case.
Steps to reproduce
Minimal reproduction project
minimal_reproduction_project.zip
The text was updated successfully, but these errors were encountered: