[Public WebGL] gamma/color profile and sRGB

Florian Bösch [email protected]
Sun Nov 23 02:51:08 PST 2014


On Sun, Nov 23, 2014 at 8:34 AM, Florian Bösch <[email protected]> wrote:

> I hope that is exactly not the case, because that would be quite the wrong
> thing to do, without the application programmer having indicated his
> willingness for this to happen.
>

It's relatively easy to show why the pass-trough case should not be
neglected.

If you receive color from an image (such as PNG/JPG) it's gamma corrected
(either implicitely because the image was created by watching an sRGB
display, or explicitely as in JPEG). Being able to receive colors
unmodified from the source is important, so you cannot decode those bytes
into linear space for storage on the fly implicitely.

Outputting those colors to screen has a variety of usecases, among them if
you do not concern yourself with lighting calculations, such as when you're
drawing a UI. So if you where to enforce linear space conversion upon
output, but do not enforce gamma space conversion upon input, you'd force
anybody wishing to output colors unmodified, to modify the colors upon
reading them in. Obviously that's not done today. It's not done, largely
because needless back/forth conversion without any actual use, introduces
its own degradation. And as a consequence of that, a lot of applications
out there make use of this "pass trough". So if you where to suddenly
enforce linear space output conversion, by default, it'd break a lot of
WebGL (and canvas) apps out there.

And those are the reasons pass trough is important. But that doesn't mean
providing better sRGB and gamma ramp handling isn't important.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20141123/e517b73b/attachment.html>


More information about the public_webgl mailing list