[Public WebGL] WEBGL_compressed_texture_s3tc_srgb

Mark Callow [email protected]
Wed Jun 15 05:57:47 PDT 2016

> On Jun 15, 2016, at 7:25 PM, Florian Bösch <[email protected]> wrote:
> On Wed, Jun 15, 2016 at 12:19 PM, Mark Callow <[email protected] <mailto:[email protected]>> wrote:
> A solution is for the browser to use an sRGB default framebuffer for its final output. It can use linear or sRGB textures for the canvas backing stores and page backing store as it wishes (ignoring issues of backward compatibility with the current broken situation).
> You cannot ignore backwards compatibility for this case.

I added the parenthetical expression precisely because I know that you can’t ignore backwards compatibility.

> So if you want an sRGB convention for the front framebuffer for WebGL, it has to be explicit and opt-in. You could do that with context creation attributes.

Try reading the proposal. You might find that this is exactly what is proposed.

> The GPU will convert everything to linear during compositing and back to sRGB again when writing the composited result.
> Browsers are colorspace agnostic, if you where to define the browsers compositor as linear space, there would be all kinds of problems with color reproduction because people have tuned all their color values to work with the non linear space compositing, so that's not going to happen. The most realistic thing to happen is just that sRGB is passed trough correctly from the frontbuffer.

Hence opt-in.

> But I need to point out, that exactly this "shunting" trough sRGB is part of the problem in color reproduction. It's better than what currently happens, sure, but it's not better than what I suggested (explicitely defining a high precision linear space frontbuffer, also as an opt-in mechanism). Although I'm aware that also puts the browsers compositor into a difficult position (because now it'd need to composit everything that way as well).

For LDR displays it is sufficient to do blending in high-precision linear then encode back to sRGB for storage in the frontbuffer, exactly what most sRGB rendering capable GPUs can do today. For HDR high-precision linear is needed and that is one of the opt-in choices in the canvas colorspace proposal.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20160615/ba38d3b0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20160615/ba38d3b0/attachment.asc>

More information about the public_webgl mailing list