Jump to content

Blurry display on small retina screen, rev 587277


Artoria2e5
  • Pending

I use a 12 inch retina MacBook with a 2304*1440 (226 pixel per inch) screen, sized by the OS to 1280*800 (125 simulated-pixel per inch) by default. Symptoms:

  • No Window positioning issues, which is good.
  • Terrible blurry text and images, which is very not great.

Crude analysis

To me it looks like the game is taking the reported resolution at face value, without taking into account the real pixels behind retina scaling (DisplayFramebufferScale). This is okay for higher resolution retinas (I have a Hackintosh with a 3840*2160 screen; there DST does down to 1920*1080, which is still acceptable), but on this one it really, really hurts.

There is no longer a "retinadisplaytests" branch, which makes things slightly harder to check -- I am using the latest branch, so the "fix" is probably in there.

I tried the "beforemacoschanges" branch, but it is as blurry as the current one. As a result, I believe this issue is just unnoticed -- the 12 inch retina of 2017 was a pretty big flop, so I don't expect many people to use it or play DST on it.

Workarounds

Fullscreen at 2304*1440 and 2560*1600 is crystal clear, of course. But fullscreen has its own problems:

  • You can't switch windows on fullscreen. That's kinda okay, until...
  • If your screen locks on fullscreen, the password entry won't work and you will have to shut off the computer forcefully.
  • If DST locks up for another reason, you have to use the force-quit or log out keyboard shortcuts to get out.

So it's really better if we can get a Window mode that works with Retina zoom enabled. Not a shim layer that always turns it off (like it is right now) or on, but some real support that works with both Retina on and Retina off.

Screenshots

I have to apologize for this: the forum resizes every picture to a max width of 1065, so you really can't use forum pics to complain about blurriness effectively. I've uploaded two screenshots at https://imgur.com/a/iFSBwX2.

  1. The first pic is a screenshot of DST. Not only is the game itself blurry, so is the top of the Window. It just looks like it's from another world when you contrast it with the clear text in the menu bar.
  2. The second pic is a screenshot of this forum. It's, well, not blurry, because the browser is not broken.

Also note that the screenshots are actually 2560*1600, not 2304*1440. I believe this means macOS is rendering to a 2560*1600 buffer (which is captured by the system screenshot hotkey), then resizing it for the physically 2304*1440 display. It doesn't result in noticeable extra blurriness, so that's okay.


Steps to Reproduce
  1. Buy a 12-inch MacBook, which is hard.
    • I don't know if you can get away with just buying an external display and setting it to 2560*1600 to simulate a 12-inch MacBook. It's worth a try, just: if you want to go down that route, make sure it's the only display connected to the Mac. Don't want some unrelated multi-display resolution bug to spoil the repro, do we?
  2. Download and install Steam.
  3. Download DST.
  4. Run DST with default settings. Bask in the glory of pixelated text.



User Feedback


Oops, I think it's not called "DisplayFramebufferScale" in the native macOS stuff; that's a name for it from either glfw or ImgUI. On the OS side it seems to be called "setContentsScale" (CALayer) and "backingScaleFactor" (NSWindow, NSScreen). Here's how glfw does that stuff: https://github.com/glfw/glfw/commit/980fc9b52f397ec54ce65f69abe9ff694622b4ab. I'm sure your macOS programmers know more about that stuff than I do. I don't even have a developer account, I am just doing code search.

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...