godot
godot copied to clipboard
Editor is scaled with visible pixelation on macOS when using multiple monitors with different scaling factors
Tested versions
Reproducible in 4.2 and 4.3, MacOS 14.1.2 (23B2091), Apple M3 Max, external 3840x1600 display. Godot default settings.
System information
MacOS 14.1.2 (23B2091), Apple M3 Max, external 3840x1600 display.
Issue description
The editor will "flicker" (every second or two, not at a very high rate), between what is shown in the screen shot (poorly antialiased fonts) and properly rendered fonts. The "flickering" is not a constant rate, and seems to be impacted by moving windows, resizing, open/closing windows, etc. Generally changing the work Godot is doing in some way.
Steps to reproduce
This is happening continuously from opening the editor for me.
Minimal reproduction project (MRP)
no required.
- Production edit (keywords for easier searching): pixelated
If you set the Font Antialiasing editor setting to None as shown in the screenshot, it's expected that fonts will generally look bad. It only really looks good for very specific fonts designed for a specific size.
I see the same results using any of the Font Aliasing settings. The screen shot just happened to have that option selected, but that setting has no discernable effect for me.
On Thu, Feb 29, 2024 at 2:38 PM Hugo Locurcio @.***> wrote:
If you set the Font Antialiasing editor setting to None as shown in the screenshot, it's expected that fonts will generally look bad. It only really looks good for very specific fonts designed for a specific size.
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/89019#issuecomment-1972090997, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3PK6OJ6SVCM33GM42ZNELYV6WVTAVCNFSM6AAAAABEATFDSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSGA4TAOJZG4 . You are receiving this because you authored the thread.Message ID: @.***>
-- Kevin Bruner / President & CEO / Bruner House, LLC e-mail: @.*** phone: 415-419-6620 / [image: Twitter] https://twitter.com/kevbru// [image: LinkedIn] https://www.linkedin.com/in/kevin-bruner-59a329/ web: www.brunerhouse.com
And the fonts DO render correctly much of the time. I am generally seeing 10-40 seconds of "good fonts" followed by 10-40 seconds of "bad fonts" regardless of various settings. Seems like perhaps an order of operations or stale state problem.
On Thu, Feb 29, 2024 at 2:49 PM Kevin Bruner @.***> wrote:
I see the same results using any of the Font Aliasing settings. The screen shot just happened to have that option selected, but that setting has no discernable effect for me.
On Thu, Feb 29, 2024 at 2:38 PM Hugo Locurcio @.***> wrote:
If you set the Font Antialiasing editor setting to None as shown in the screenshot, it's expected that fonts will generally look bad. It only really looks good for very specific fonts designed for a specific size.
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/89019#issuecomment-1972090997, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3PK6OJ6SVCM33GM42ZNELYV6WVTAVCNFSM6AAAAABEATFDSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSGA4TAOJZG4 . You are receiving this because you authored the thread.Message ID: @.***>
-- Kevin Bruner / President & CEO / Bruner House, LLC e-mail: @.*** phone: 415-419-6620 / [image: Twitter] https://twitter.com/kevbru// [image: LinkedIn] https://www.linkedin.com/in/kevin-bruner-59a329/ web: www.brunerhouse.com
-- Kevin Bruner / President & CEO / Bruner House, LLC e-mail: @.*** phone: 415-419-6620 / [image: Twitter] https://twitter.com/kevbru// [image: LinkedIn] https://www.linkedin.com/in/kevin-bruner-59a329/ web: www.brunerhouse.com
Can you reproduce this issue without an external display connected?
No. On my laptop's built-in monitor everything seems to render properly.
The external display is a Dell UltraSharp 38 @ 3840 x 1600
The built in display is:
Apple M3 Max:
Chipset Model: Apple M3 Max
Type: GPU
Bus: Built-In
Total Number of Cores: 30
Vendor: Apple (0x106b)
Metal Support: Metal 3
Displays:
Color LCD:
Display Type: Built-in Liquid Retina XDR Display
Resolution: 3024 x 1964 Retina
Main Display: Yes
Mirror: Off
Online: Yes
Automatically Adjust Brightness: Yes
Connection Type: Internal
On Thu, Feb 29, 2024 at 2:58 PM Hugo Locurcio @.***> wrote:
Can you reproduce this issue without an external display connected?
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/89019#issuecomment-1972115001, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3PK6IAACBA6DDXADUXGE3YV6ZC3AVCNFSM6AAAAABEATFDSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSGEYTKMBQGE . You are receiving this because you authored the thread.Message ID: @.***>
-- Kevin Bruner / President & CEO / Bruner House, LLC e-mail: @.*** phone: 415-419-6620 / [image: Twitter] https://twitter.com/kevbru// [image: LinkedIn] https://www.linkedin.com/in/kevin-bruner-59a329/ web: www.brunerhouse.com
This is likely due to the same cause as https://github.com/godotengine/godot/issues/61357.
Does sound like it might be the same. I'll see if I can help out on the issue. Thanks!
On Thu, Feb 29, 2024 at 3:12 PM Hugo Locurcio @.***> wrote:
This is likely due to the same cause as #61357 https://github.com/godotengine/godot/issues/61357.
— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/89019#issuecomment-1972129108, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3PK6KD2GLYGUMDZQIRMTLYV62VHAVCNFSM6AAAAABEATFDSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSGEZDSMJQHA . You are receiving this because you authored the thread.Message ID: @.***>
-- Kevin Bruner / President & CEO / Bruner House, LLC e-mail: @.*** phone: 415-419-6620 / [image: Twitter] https://twitter.com/kevbru// [image: LinkedIn] https://www.linkedin.com/in/kevin-bruner-59a329/ web: www.brunerhouse.com
I came here looking for a fix for this; M2 Air + Samsung 30" external monitor.
I noticed that clicking between the text editor area and the output/debugger below it would flip the fonts from proper aliasing to bad aliasing. I thought I could screen record > gif this, but if you try and capture it, it doesn't flip back to normal.
I tried Quicktime, no dice it just looks bad all the time, and if OBS is running it won't flip back and forth at all (recording or not).
So whatever is hooking into the screen to capture frames prevents it from going back to normal.
edit: setting Editor Settings > Interface / Editor / Update Continuously = True seems to quash the bad aliasing.
Am the quickest fix for this is to close the lid on the Mac which eliminates the “two monitors at different resolutions” situation, which appears to be the root of the problem. Sent from my iPhoneOn May 2, 2024, at 8:02 PM, noeldodd @.***> wrote: I came here looking for a fix for this; M2 Air + Samsung 30" external monitor. I noticed that clicking between the text editor area and the output/debugger below it would flip the fonts from proper aliasing to bad aliasing. I thought I could screen record > gif this, but if you try and capture it, it doesn't flip back to normal. I tried Quicktime, no dice it just looks bad all the time, and if OBS is running it won't flip back and forth at all (recording or not). So whatever is hooking into the screen to capture frames prevents it from going back to normal.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
+1 (v4.3.beta.custom_build [705b7a0b0]) on macOS Sonoma 14.2.1.
When the main UI window is interacted with, the pixelation goes away for a moment, but when it's idle, it returns to shoddy. As luck would not have it, this doesn't occur when recording the screen with QT (it remains terrible all the time), so please enjoy a phone video of a screen (possibly the only time in history doing that is a good idea for a bug report...).
https://github.com/godotengine/godot/assets/58669/0f26c47d-2680-4450-877b-2b7ef9c557c3
- Enabling "Update Continuously" mitigates the problem.
- With some editor windows (shader/script) on the Retina screen and the main UI on a non-Retina external display, the windows on the retina screen work fine all the time. When those editor windows are moved to the external screen, they occasionally "heal" when interacted with... but not always.
Experiencing the same issue when using Forward+ OR Mobile renderers but not in Compatibility renderer .
This is only happening in my external display, when i move the godot editor window to the mac's original display, it works fine .
Godot 4.3 Beta 1
Mac M2 Pro.
I'm experiencing the same issue since moving from Godot 4.2 to 4.3 beta 2. It might seem like a small issue, but the crunchiness flickers between levels of distortion and certain symbols become difficult to read. A few hours of coding like this gets very frustrating. This issue is not present in 4.2. I use an M2 MacBook Pro. The only way to use multiple monitors with the MacBook pro is to use DisplayLink and a hub to extend the displays. So I have my high DPI MacBook Pro screen and then two 1080p Dell monitors. The crunchy text issues occur only on the extended Dell monitors. Setting the editor to update continuously does not resolve the problem. I hope someone can figure out what broke the text rendering on Macs.
I hope someone can figure out what broke the text rendering on Macs.
You could look into bisecting the regression to precisely determine which commit caused the issue. I can't reproduce this on my end and it seems other users can reproduce the issue on both 4.2 and 4.3, so you would need to be the one bisecting the regression.
I'll try bisecting the regression in the next few days as soon as I find the time.
In version 4.3-dev3 the font still looks ok, from version 4.3-dev4 it no longer does.
FYI. The 4.3-dev3 universal build for macos I grab from here (v4.3.dev3.official [36e943b6b]) does not have the issue. However, when building from source using the same commit, the problem occurs.
Also there's some warning and error when running the local build (from source) in CLI:
Godot Engine v4.3.dev.custom_build.36e943b6b - https://godotengine.org
Vulkan API 1.2.283 - Forward Mobile - Using Vulkan Device #0: Apple - Apple M1
WARNING: Invalid pipelines cache header.
at: pipeline_cache_create (drivers/vulkan/rendering_device_driver_vulkan.cpp:2264)
ERROR: Condition "p_idx >= item_start + item_count" is true.
at: global_menu_remove_item (platform/macos/display_server_macos.mm:1909)
ERROR: Condition "p_idx >= item_start + item_count" is true.
at: global_menu_remove_item (platform/macos/display_server_macos.mm:1909)
WARNING: 1 RID of type "StorageBuffer" was leaked.
at: _free_rids (servers/rendering/rendering_device.cpp:5002)
WARNING: 1 RID of type "Framebuffer" was leaked.
at: _free_rids (servers/rendering/rendering_device.cpp:5002)
WARNING: 4 RIDs of type "Texture" were leaked.
at: finalize (servers/rendering/rendering_device.cpp:5150)
Running the official build from CLI does not show the above error:
Godot Engine v4.3.dev3.official.36e943b6b - https://godotengine.org
OpenGL API 4.1 Metal - 88.1 - Compatibility - Using Device: Apple - Apple M1
Editing project: /Users/poga/new-game-project
For dev4 official build, It seems that it also use OpenGL 4.1 Metal but the problem occurred.
Godot Engine v4.3.dev4.official.df78c0636 - https://godotengine.org
OpenGL API 4.1 Metal - 88.1 - Compatibility - Using Device: Apple - Apple M1
For VulkanSDK, I tried both 1.3.283.0 and 1.3.268.1. They all have the same problem when compiling from source.
MacOS: Sonoma 14.5 CPU: Apple M1
Did some more test using 4.3-beta2. I'm using an external monitor (4K) connected to a M1 macbook pro.
Under MacOS Preference -> Display, There's a scaling option:
If I set it to default (1920x1080) for the external display. The problem instantly disappear for the currently running editor.
If I switch it back to "More space" (3840x2160) The problem instantly comes back for the running editor.
Hope this helps.
I also couldn't compile a good version without issues.
4.2/dev3<-->4.2/dev4(allgit bisect bad)VulkanSDK/1.3.250.1
https://docs.godotengine.org/en/latest/contributing/workflow/bisecting_regressions.html
go to the folder that contains the pre-release you downloaded and look for the README.txt
V4.2
https://downloads.tuxfamily.org/godotengine/4.2/dev3/README.txt
Built from commit 013e8e3afb982d4b230f0039b6dc248b48794ab9
https://downloads.tuxfamily.org/godotengine/4.2/dev4/README.txt
Built from commit 549fcce5f8f7beace3e5c90e9bbe4335d4fd1476
V4.3
https://downloads.tuxfamily.org/godotengine/4.3/
no README.txt
Since this doesn't seem reproducible in custom builds, it's likely related to the toolchains we used for the official builds of 4.3.dev3 and 4.3.dev4.
I updated all toolchains around that time, and based on what I wrote in https://github.com/godotengine/build-containers/pull/138 (merged the day of the dev4 release, so I guess I used that version for it), the dev3 release still used the previous versions of the Xcode SDKs.
| Version | Xcode | MacOSX SDK |
|---|---|---|
| 4.2.x.stable, 4.3.dev3 and earlier | 15 | 14.0 |
| 4.3.dev4 to 4.3.beta1 | 15.2 | 14.2 |
| 4.3.beta2 | 15.5 | 14.5 |
So this might be a change in behavior in the MacOSX SDK between 14.0 and 14.2.
I'll try to make a build of the current master branch with MacOSX SDK 14.0 to confirm this hypothesis.
Could you test this build which is the current master branch (25de53e147a04ba15afc461b3ad4aa1884ff927d) but built against MacOSX SDK 14.0?
https://downloads.tuxfamily.org/godotengine/testing/4.3-beta-macosx-sdk-14.0/Godot_v4.3-beta-macosx-sdk-14.0_macos.universal.zip
Tested. Pixelation still happens
I also have issues with the master (14.0) version, the Metal and other graphics libs are identical to the dev3 version.
otool check
otool -l ~/Develop/Godot/Godot.4.3-dev3.app/Contents/MacOS/Godot > /tmp/Godot.4.3-dev3.log
otool -l ~/Develop/Godot/Godot.4.3-dev4.app/Contents/MacOS/Godot > /tmp/Godot.4.3-dev4.log
otool -l ~/Downloads/Godot.app/Contents/MacOS/Godot > /tmp/Godot.4.3.master.log
current version
/System/Library/Frameworks/Metal.framework/Versions/A/Metal
4.3-dev3 = 341.16.0
4.3-dev4 = 341.35.0
4.3.master = 341.16.0
The Window Size (Project Settings) is also calculated incorrectly, only half the size.
Screenshots
(Screenshot size: 264 × 440, Test with Godot 4.2.1)
https://github.com/godotengine/godot/blob/4ab8fb809396fa38ba929fec97cfcb7193f1c44d/platform/macos/display_server_macos.mm#L3487-L3490
If I deactivate this calculation, then everything seems to be ok (on 4k and Full HD Display, Editor and Project) But on the 4 k display, the font is slightly zoomed / enlarged. I think Godot would have to monitor more closely which display the window is currently on and calculate the scaling and window size dynamically.
from PR: https://github.com/godotengine/godot/pull/56825. (not yet checked why exactly this change was necessary)
Full HD and 4k Display
screen_count: 2
display_max_scale: 2.000000
Only Full HD Display
screen_count: 1
display_max_scale: 1.000000
can confirm that It worked 👍 Thanks!