-
Bug
-
Resolution: Invalid
-
None
-
1.19.2
-
None
-
2019 16" MacBook pro running macOS with a 3072x1920 resolution, nothing else matters
-
Unconfirmed
-
(Unassigned)
Overall issue description: The OpenGL render resolution on macOS is not set correctly. 30% too many pixels are rendered on my device specifically. This affects all versions, and all macOS Java users. It goes without saying this is a big issue.
Big-picture explanation of cause: The issue is caused by some confusion over the way macOS specifies its resolution, and misinformed fixes to earlier bugs. Multiple bug reports have been made by this already, but are also misinformed and incorrectly closed.
Detailed explanation:
There are two resolution definitions that needs to be specified to understand the issue.
Firstly there is the true screen resolution. This is obviously what the game should render at, as do other games supporting macOS. It is the resolution graphics APIs use, etc. It is the resolution that does no scaling, it 1:1 maps data to display pixels. My native resolution, the resolution the screen is rendered at, the resolution OpenGL and whatnot have in a full screen window, and the resolution displayed by macOS under About > Displays, is 3072x1920. This is not scaled in any way, make no mistake, macOS renders its system at this resolution without scaling, just as other operating systems like Windows do. This computer also runs Windows natively, which it does so at 3072x1920.
Secondly, there is the apparent resolution. This started because of Apple's retina displays, and means pretty much nothing anymore. Today, in display settings, you can enable 'scaled'. Scaling to 'default' (which doesn't scale at all) says 'looks like 1792x1120' which I'll call here the 'apparent retina resolution'. This is a relic, supposedly to do with DPI; there is no other place you can even see this resolution, it means nothing. Again, macOS renders at the display resolution, just like Windows does, which is for me 3072x1920. No OS issues anywhere.
The game renders at 3584x2240 on my system. This is exactly double the apparent resolution of 1792x1120. This is 30% more pixels than the screen resolution of 3072x1920.
Why does the game render at double the apparent retina resolution?
There used to be an issue that the game rendered at the apparent retina resolution instead of the true screen resolution, probably because of the method used to ask the system for resolution. This would obviously be an issue because the apparent retina resolution is tiny, so the game would dramatically upscale. See MC-32327. In this report, the issue was not clearly understood in the title: they thought the resolution was half. Similarly, the 'fix' was poor: the resolution was doubled. This is why the game renders at double the apparent retina resolution.
So the fundamental issue becomes clear: Minecraft uses double the retina resolution instead the true screen resolution. In MC-127339 (earlier issue) mod Matthew said that macOS lies about its resolution and that somehow what they (Mojang) do now is right. This is plain fiction, there are no OS issues, as discussed. The apparent retina resolution means nothing, and no graphics APIs uses it to base their resolution off of it, and certainly no game should use it to base their resolution off of. A long time ago, the true resolution was approximately double the apparent retina resolution on most machines, so the issue wasn't a big deal. Another way to put it, 30% extra pixels used to be closer to 0% extra pixels.
The fix: The game must currently ask the system for its resolution in some bizarre way that returns the retina resolution instead of the true resolution, and then you double that to 'fix' it. Then it renders this wrong resolution and scales it to fit the (smaller) screen. This is not an Apple issue. Windowing APIs (WGL and whatnot) plain don't have this issue, that's why 20 year old games on macOS do it right and Minecraft doesn't.