12 ms·
ex-MacOS SWE here. Subpixel antialiasing is obnoxious to implement. It requires threading physical pixel geometry up through multiple graphics layers, geometry
by ridiculous_fish 8y ago
ex-MacOS SWE here. Subpixel antialiasing is obnoxious to implement. It requires threading physical pixel geometry up through multiple graphics layers, geometry which is screen-dependent (think multi-monitor). It multiplies your glyph caches: glyph * subpixel offset. It requires knowing your foreground and background colors at render time, which is an unnatural requirement when you want to do GPU-accelerated compositing. There's tons of ways to fall off of the subpixel antialiased quality path, and there's weird graphical artifacts when switching from static to animated text, or the other way. What a pain!
Nevertheless there's no denying that subpixel-AA text looks better on 1x displays. Everyone notices when it's not working, and macOS will look worse without it (on 1x displays).
- davnn 8y ago> Subpixel antialiasing is obnoxious to implement. Isn't it completely abstracted away from 99%+ of macOS development?
- jacobolus 8y agoYes, but if it dramatically increases complexity for all the lower levels of the rendering stack, it ends up creating extra work for those OS/framework developers, requiring separate versions of the code targeting different displays which must be maintained separately with different sets of bugs in each, preventing them from making large-scale architectural changes they want to make, restricting some types of significant optimizations, etc.
- sova 8y agoYeah but isn't it already a solved problem with 1x monitors? Who is implementing things multiple times for no reason? I'm glad in the future it will be easier for Apple because they just won't hire devs to do that part then, but does this imply that 1x monitors will simply look inferior no matter what is done with newer versions of OSX+?
- rbanffy 8y agoThis complexity is why we can't have windows that spread between 1x and 2x monitors since the introduction of Retina displays. Ideally everything should be rendered (and cached) to the maximum resolution available (minimum trace widths considered) and then downsampled to the specific screens with subpixel data applied, but that's a lot of processing to do and battery life would suffer.
- brigade 8y agoEh? Before Yosemite was released in 2014, one window could span between a 1x and 2x monitor. I forget if it was always rendered at 1x, or if it was rendered at 2x and scaled for the 1x, but yeah it looked like crap on one or the other. Actually I think it switched depending on which monitor had more of the window? But they only eliminated windows spanning across multiple monitors when they made spaces per-display.
- jacobolus 8y agoIt’s already a solved problem if you want to keep using the software you already wrote, and never do anything different. (Nobody is stopping people from running OS X 10.13 indefinitely on their 1x displays.) If you want to rearchitect your whole text / vector graphics rendering pipeline to take proper advantage of GPUs, then you are going to be much happier with your life if you don’t have to double your work to support legacy hardware. I would love to see Apple implement this kind of thing http://w3.impa.br/~diego/projects/GanEtAl14/ http://w3.impa.br/~diego/projects/GanEtAl14/
- 8y ago
- AlexandrB 8y agoApple has a $200B war chest. If they can't afford to deal with this problem and instead choose to make my experience worse that says something about their priorities as a company.
- coldtea 8y agoTheir priorities is not just everybody (and has never been). It's high end users, who can afford $2/$K laptops and hi-dpi displays. Do they always get things right for them? No. But those are their users, not the average joe.
- dwaite 8y agoYou must realize that not all problems can be paved over via money and engineering bodies, right?
- trumpeta 8y agoI have a 2015 rMBP with nVidia 750m and recently I switched from Apple Cinema Display to a 4k screen. At any of the graphical modes between the full 2x retina and 1x the whole OS gets extremely sluggish to the point of unusable. Some people from Jetbrains have looked into it and concluded it was the font rendering in IDEA bringing down the entire system. Do you think this change can improve this? Because it certainly sounds like it.
- Arkanta 8y agoSorry for the rant, but given the price of the JetBrains Toolbox, it infuriates me that they've been giving us HDPI users the middle finger for a couple of years now. First of all, switching to grayscale helps A LOT. mojave does this system wide, but the JVM (or IntelliJ, I don't really remember) has its own font rendering system, so you need to change that in IntelliJ directly. I was hurt terribly by this issue. My problems have been solved by three things: - IDEA update that reworks the statusbar undertermined progress bar, which maxed my cpu just for a dumb anymation - Going from an iGPU to dGPU mac (you seem to have one, so congrats, it would be way worse with only your iGPU) - Using an experimental JVM from this thread: https://youtrack.jetbrains.com/issue/IDEA-144261 https://youtrack.jetbrains.com/issue/IDEA-144261 That said, JetBrains messed up with their 2018.1 release again. I'm mostly using Android studio, which lags behind IntelliJ's versions. 3.1 merged the stupid progressbar fix, but I'm not looking forward when 3.2 hits stable, with 2018.1 merged in. Bottom line is that there are multiple factors in JetBrain's custom OpenGL UI inefficiencies combined with Oracle's JVM bugs/inefficiencies that takes down the whole system, but it's ultimately not only a font smoothing issue. JetBrains doesn't really care, or at least doesn't show that they care. They first said "we don't notice that", and then released some JVM patches in the comments of an issue. Of course, Oracle also shares part of the blame: none of this would have happened had they kept Apple's JVM Quartz support.
- still_grokking 8y agoTop comment on the bug tracker: > Joshua Austill commented 24 Jun 2018 06:21 > @Gani Taskynbekuly OH MAN! I knew I was having this issue way worse at some times than others, but I'd never made the connection to sleep mode. Since reading your comment I've just been shutting my laptop down instead of closing the lid and letting it sleep and the problem has all but gone away. I searched High Sierra sleep issue and this is a well-known issue with bug reports. This means this isn't a JetBrains issue, it's a mac issue. It is annoying to turn off graphics switching and sleep mode and have crappy battery life, but hey, I'll pay that price for a usable laptop. I owe you a drink of your choice! Seams like a macOS issue. I heard even rumors that's not the only issue with that OS. ;-)
- tobr 8y agoThis and the document @gnachman posted has me intrigued. Are you saying that subpixel AA is not just like a multichannel mask? I would expect the amount of R/G/B foreground and background color for a given pixel to be the same regardless of what those colors actually are?
- deleted 8y ago[deleted]
- jgh 8y ago(note I haven't worked on subpixel AA for font rendering, but have for something different) the amount of color you apply to each subpixel has different levels of intensity depending on how deeply into the pixel the shape goes, so you would need to blend with whatever is behind/in front of it. Also you can't just do something like write (128,0,0) to a pixel and leave it at that, you'll have a red pixel. It would need to be blended with what's already there.
- hn0 8y agoI expect this would be the case with alpha compositing at least... Afaict subpixel rendering is supersampling width with multiples of 3, then modulo via the horizontal coordinate into rgb triplets and divide by supersampling factor. I guess if kerning and position are also subpixel it might become more tricky to cache results efficiently.
- xenadu02 8y agoSubpixel-AA was not removed from macOS Mojave so the title is completely wrong anyway. This was covered at WWDC. It uses grayscale-AA now which is much easier to hardware accelerate and gives a more consistent experience across different types of displays.
- systoll 8y agoIf it's greyscale, it's not subpixel antialiasing.
- dahart 8y agoYou are right. But I think parent comment understands the concepts, and was misled by the name, which to be fair, is a misleading name. The names "subpixel AA" and "grayscale AA" are both terrible names. Grayscale AA isn't somehow gray or monochromatic, it is regular anti-aliasing, it works in color, and it works by averaging (virtual) sub-pixel samples. The name is trying to refer to how it's not making use of the physical LCD color subpixels. Both names assume that the term "sub-pixel" is primarily referring to LCD hardware, rather than general sub-area portions of a pixel. From my (graphics) point of view, the LCD case is a specific and rare subset of what people mean by "subpixel", which is what makes these terms seem misleading and awkward.
- captainmuon 8y agoPersonally, I think that is moving in the wrong direction. This is the reason text looks bad on transformed HTML elements in browsers, or when you click a button on Windows and it tilts slightly. Text rendering should be aware of the (sub)pixels, even post-transform. While we're at it, this can apply to vector art, too. If we ever want to have a hope of computers looking like, e.g. this Microsoft fluent design mockup [1], which is clearly window-based, but the windows are tilted slightly and shaded giving it a physical appearance, we'd have to go in that direction. If we stay in the model where everything is a texture that gets composited, the only thing we can do is to use higher resolution / retina display. Also, one thing I've never seen discussed are virtual displays inside a VR world. The VR headset has plenty of pixels, but you can't simulate a full HD screen at a few feet distance, let alone a retina screen. [1] https://cdn0.tnwcdn.com/wp-content/blogs.dir/1/files/2017/05/Fluent-What-796x443.jpg https://cdn0.tnwcdn.com/wp-content/blogs.dir/1/files/2017/05...
- akvadrako 8y agoObviously the right direction is replacing sub-pixels with pixels. Maybe you meant this is premature?
- coldtea 8y ago>If we stay in the model where everything is a texture that gets composited, the only thing we can do is to use higher resolution / retina display. Which is what we _should_ be doing. What do you expect, some resurrection of the low res display market, or perhaps the return of VGA?
- dahart 8y ago> This is the reason text looks bad on transformed HTML elements in browsers, or when you click a button on Windows and it tilts slightly. It's pretty common for regular AA to be borked in those situations, browser support for AA under transforms hasn't ever been awesome, and it's only been decent in the major browsers pretty recently. > Text rendering should be aware of the (sub)pixels, even post-transform. While we're at it, this can apply to vector art, too. Text & vector rendering with regular AA are currently aware of virtual sub-pixels, when they're not borked by transforms like in your examples. But making the browser rendering engine have to be aware of the order and orientation of your specific LCD hardware sub-pixels of your monitor would be very difficult for browsers to support. There is a reason subpixel AA has never worked everywhere. When I first glanced at this article yesterday, I got the mistaken impression that Apple was turning off all AA, not the LCD specific ClearType style of subpixel AA. That would be a big deal, but that's not what's happening. The difference between regular AA and ClearType style AA does exist, but it's pretty small. I'm a graphics person, and I'm very much in favor of AA, but the outrage at losing subpixel AA feels overblown to me. It helps a little, but also has the downside of chromatic aberration. I'm honestly wondering if most of the hubbub here is people making the same mistake I did initially and thinking that they're losing all anti-aliasing?
- iamaelephant 8y agoOh gee we didn't realise it was haaaaard.
- SCdF 8y ago> Subpixel antialiasing is obnoxious to implement Totally, but > there's no denying that subpixel-AA text looks better on 1x displays. I get that it's hard, but at the end of the day what users are going to notice is, when they dock their laptop at work, their display is going to look like fuzzy crap. Maybe most people won't notice? It's hard to tell without seeing a side-by-side comparison.
- eloisant 8y agoI guess Apple just wants everyone to buy retina displays, and don't care about people using what they believe is "legacy" hardware.
- ksec 8y agoThis wouldn't be a problem, if 1) They had Retina MacBook Air 2) They actually have a Monitor Line, that is Retina+ Display, Super great colour accuracy etc. For 1st point Apple doesn't seems to care, and 2nd point, Apple should at least have a list of Monitor that work best or up to their "Standards". Or on sale at Apple Store. These attention to details, in its ecosystem weren't as obvious when Steve were here. But recently they have started to show cracks everywhere.
- akvadrako 8y agoThis is a good indication they will remove the Air from the lineup this fall and replace it with a lower-end MacBook.
- omarforgotpwd 8y ago"Listen guys the code for this is a mess. Can you just buy the new Macbook?" (love my latest gen Macbook Pro, but this is the classic problem with Apple's approach to product design)
- pdpi 8y agoIt’s less “the code for this is a mess”, and more “the code for this can’t be anything but a mess”.
- marktangotango 8y agoThe gp’s exposition is explicit but makes no sense to me, in a scenegraph architecture all that would be very straightforward for example.
- AlexandrB 8y ago> It’s less “the code for this is a mess”, and more “the code for this can’t be anything but a mess”. Ok. But so what? As a customer that's not my problem, and Apple has a HUGE war chest to pay developers to maintain the mess. I have nothing but 1x displays externally and this makes Mojave a non-starter.
- coldtea 8y ago>Ok. But so what? As a customer that's not my problem, It is. Customers pay for code debt too -- with bugs, slow performance, and slower moving features.
- admax88q 8y agoI really don't believe that subpixel rendering is such an inherently complex problem that there is no clean way to implement it. From the OP it sounds more like its a pain to implement due to the number and design of abstraction layers in the modern macOS graphics stack.
- noblethrasher 8y agoMeh. I see their point. Subpixel AA was about using software to simulate better hardware. But, at the end of the day you really do want the better hardware so that you can use your software budget to simulate an even better generation of hardware. Repeat ad-infinitum, modulo scaling limits. Pretty sure this is what Alan Kay means when he says that people who are serious about software will make their own hardware.
- plattegrond 8y agoIt's also easier to implement non-gamma correct blending, but seeing as it looks terrible and uneven, Apple so far has not done that. More so, most technical people don't even understand that one, so good look getting a non-Jobs type to see the importance. Non-retina displays are going to stick around for years. Not everyone wants high DPI, I for one much prefer working on a giant non-Retina monitor instead, for more real estate instead of detail. I don't know what they put in the water in the Bay Area, but everyone seems to be moving towards a lowest common denominator approach. This is a terrible decision, and if they don't fix it, it'll be just another reason to abandon the platform.
- dahart 8y ago> It's also easier to implement non-gamma correct blending, Gamma correct blending doesn’t require threading the information through multiple graphics layers, as the parent comment put it. The difficulty of a gamma correct blending implementation isn’t even remotely close to the difficulty of subpixel AA. > so good look getting a non-Jobs type to see the importance. I’m not sure I understand what you mean. Mac was the first major PC platform that had configurable gamma correction and color calibration in the OS. It used to be known as the platform for designers, and more people using Mac cared about color and gamma for display and print than for any other platform. > Not everyone wants high DPI... I prefer more real estate instead of detail You actually don’t want high DPI even if you can have it on a large monitor? Or do you mean you prioritize monitor size over resolution? Low DPI is not going to be a choice in the future... the near future. And once it’s gone, it’s never coming back. > This is a terrible decision Can you elaborate on how it affects you personally? Since you know about gamma, you do know the difference between LCD subpixel AA and regular AA, right? For some people, subpixel AA is blurrier than regular AA. For me, I see slight improvement, but it is by no means some sort of deal breaker. I’m not clear what the outrage is about, can you explain?
- protomyth 8y agoIf our LG 21x9 displays all look like crap when we dock our MacBook Pros, then it’s just one more justification for the Windows lovers (yes, they exist) to move to Surfaces. Adobe doesn’t care which we run.
- seanmcdirmid 8y agoI find Windows anti aliasing to already look like crap vs. subpixel on a Mac, so is that what you mean? On the other hand, I won’t tolerate 1x displays on either platform anymore, so this change hardly affects me.
- no_identd 8y agoYeah but Windows has https://github.com/snowie2000/mactype https://github.com/snowie2000/mactype
- protomyth 8y ago> On the other hand, I won’t tolerate 1x displays on either platform anymore, so this change hardly affects me. Well, buying 60 4K displays was out of our budget and the LG displays looked very nice. I guess we're just not rich enough.
- seanmcdirmid 8y agoAre 4K displays still that expensive? You can’t buy 1024x768 displays anymore (well, outside of projectors) even though they would cheaper. The same will be true for 1x sooner or later.
- x3sphere 8y agoIf you aren't after a certain size or refresh rate, then 4K displays have gotten pretty affordable -- but if you want one with high refresh or a more exotic resolution things get quite expensive. Example, the Acer X27 which offers 144 Hz is $2000: https://www.newegg.com/Product/Product.aspx?Item=N82E16824011229&cm_re=4k_144hz-_-24-011-229-_-Product https://www.newegg.com/Product/Product.aspx?Item=N82E1682401... LG's 34WK95U (5K ultrawide, not out yet but supposedly will be next month), is $1500. Personally, I have a 38UC99 right now and I want to stick with the 21:9 aspect ratio, so I'm waiting for that 34UK95U.
- RaleyField 8y ago> Subpixel antialiasing is obnoxious to implement. I imagine 10 engineers that worked out antialiasing at Apple are handsomely compensated for their suffering. I hook my mac to a cheap ultrawide. Will Apple give me 1k eur to get a new monitor with 4x pixel density so I can continue using my computer that I got from them only a few months ago or will my mac become obsolete? This is unworkable.
- thirdsun 8y agoYou sound very dramatic. You know, you could just not update the OS if it's that important to you. As someone with a non-retina iMac I'm also affected, but I understand that non-retina displays are a niche category these days. Thinking about it, I guess the Macbook Air is the only computer Apple is selling that doesn't use a retina display.
- _Tev 8y ago> I understand that non-retina displays are a niche category these days Social bubble detected
- bhouston 8y agoIf this was hard for apple imagine how much work it was for Microsoft with their complete lack of control over monitor displays. But they pulled it off.
- coldtea 8y agoPulled it off, or they just don't care to streamline their code and get the best performance, but instead hold tight to all kinds of legacy crap in sake of compatibility?
- jordache 8y ago>..but instead hold tight to all kinds of legacy crap in sake of compatibility? Yes the pulled that *hit off... imagine all the combination of components and drivers they needed to support. Way more of a challenge than a closed system like Mac.
- StaticRedux 8y agoHolding tight to 'all that legacy crap' is what makes Windows the de facto standard for desktop. Despite people trying to insist on it being business practices from twenty years ago, the simple fact is that Microsoft dominated, and still dominates, bc of backwards compatibility, a lesson that Apple has never learned (or never cared to learn) and why they will never have more than a few percent market share on the desktop. And despite the gossip bloggers constant nonsense, the desktop market is still be much alive and thriving.
- coldtea 8y ago>Holding tight to 'all that legacy crap' is what makes Windows the de facto standard for desktop. Well, MacOS doesn't aspire to be the "de facto standard for desktod", or to be able to used in 10 years old machines in some corporation. Isn't it nice that there are options with different priorities?
- bhouston 8y agoWell I may run dual 4k 32inch monitors at work but do not think I run a desktop. I run them off my laptop.
- veidr 8y agoThat's pretty interesting.. I already thought it was a reasonable engineering decision, though, because of one other factor: the bar for what a screen should look like has gotten massively higher over the last several years. On 1x displays, yes, subpixel antialiased text absolutely looks better... but it still looks like shit compared to any modern phone, any MacBook Pro or high-res Dell laptop from the past several years, to any 27" 5K display or 20" 4K display, etc. Subpixel-AA used to be the way to get the best text rendering possible, for all normal computer users. But now, it sounds like it requires maintaining some bug-prone, nightmarish architecture, just to get slightly-better-but-still-terrible text rendering. That probably isn't worth it. Love fish shell, btw!
- Certhas 8y agoI have not a single high-res display that's not a phone. Not at work, not at home. Nor does anyone else at my work or anyone else I know at home.
- speeder 8y agoAlso, only work on specific screens. My main computer I am still using a CRT, and the flat panels I own some of them are with pixels in funky patterns, and when enabling sub pixel the image instead gain lots of random color fringes. And you can't use rotated screens either. I saw people doing that to read source code easier, with multiple screens rotated, and rotated screens are used in some games, Ikaruga for Windows for example explicity supports rotated screen mode.
- baybal2 8y ago>Subpixel antialiasing is obnoxious to implement. Yet, somehow, freetype guys did it all
- cma 8y agoThis change seems to be dumping on Steve Jobs' graduation speech where he talks about taking calligraphy classes and how it made him realize the importance of good font rendering.
- astn 8y ago>It requires knowing your foreground and background colors at render time, which is an unnatural requirement when you want to do GPU-accelerated compositing Most of the apple hardware supports ARB_blend_func_extended or even EXT_framebuffer_fetch, which lets you to implement subpixel blending with ease. Otherwise you just have to fall back to traditional alpha blending and render each glyph in three passes for each color channel, which is not that hard either.
- StaticRedux 8y agoSo the Apple philosophy is, "when things get hard, don't bother, just walk away and abandon your current customers"? Sounds like a real winner.
- sosborn 8y agoIs that really what you took away from this?
- dwaite 8y agoNot so much hard but a hack. There is also no clear non-hackish way to implement sub-pixel rendering after 20 years of experience across at least three platforms. Also since we no longer have consistent sub-pixel layouts, sub-pixel rendered text is no longer portable to another screen, such as you get with an image containing text on a web page.