3 ms·
So much software gets this sort of thing wrong by either ignoring or incorrectly accounting for gamma.
by ska 7y ago
So much software gets this sort of thing wrong by either ignoring or incorrectly accounting for gamma.
- londons_explore 7y agoAll internet browsers have to use 'wrong' blending when combining transparent objects. If they 'fixed' the bug, and rendered with correct physical-aware alpha blending, a bunch of websites wouldn't look correct anymore.
- daxterspeed 7y agoIt's rather disappointing that websites can't request linear ("correct") alpha compositing in any way. I suppose it's a bit of fingerprinting, but browsers can already be fingerprinted by gamut support[0]. [0]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut https://developer.mozilla.org/en-US/docs/Web/CSS/@media/colo...
- leni536 7y agoAlpha blending can be an other can of worm. There is premultiplied alpha for correct interpolation between color values with alpha and then there is the lack of per-channel alpha that would be useful for subpixel antialiasing against a transparent background.
- londons_explore 7y agoSubpixel anti-aliasing I suspect is technology that will go the same way as video interlacing... ie. "It works great, has a positive benefit on the user experience, but adds so much system complexity, limits other operations, and is so hard to implement right, that it fell out of use" Today subpixel anti-aliasing is implemented mostly for text only - we've given up implementing it for 2d/3d graphics.
- eat_veggies 7y agoIn that case they could they make it a CSS property? Something like `alpha-mode: physical-aware`, defaulting to the current "wrong" blending. Or is this such a fundamental change that it would be infeasible to support both modes?
- londons_explore 7y agoThis would be totally do-able. The change would be fairly invasive inside the Blink/Webkit rendering engine if you wanted to support both physically aware and non-physically aware blending simultaneously in the same compositing layer (I suspect you'd have to split everything into multiple GPU surfaces - one for physical blending, one for 'wrong' blending, and more if any of those objects are interleaved in zIndex - that might use a lot of RAM in some cases). A per-page blending mode would probably be easy to implement.