[Public WebGL] gamma/color profile and sRGB

Florian Bösch [email protected]
Mon Nov 24 01:20:39 PST 2014


On Mon, Nov 24, 2014 at 7:58 AM, Florian Bösch <[email protected]> wrote:

>  I don't know if they can read out the sRGB values (not converted to
> linear space) out of a texture that would serve as the drawing buffer for
> pass trough (because the browsers compositor isn't linear space). This is
> where the vendors need to speak up.
>

Ah-ha!

"Sampling one of these textures will always return the color value decoded
into a linear color space. However, an application may wish to sample
and retrieve
the undecoded sRGB data from the texture and manipulate that directly."

   -
   http://developer.download.nvidia.com/opengl/specs/GL_EXT_texture_sRGB_decode.txt

   -

   https://www.khronos.org/registry/gles/extensions/EXT/texture_sRGB_decode.txt


That means it should be possible for a browser to implement an sRGB drawing
buffer if that extension s available. It's fairly new, so that means, that
sRGB drawing buffer support cannot be assumed, which means the API would
have to be more than a flag on the context.

How about:

   1. Introduce EXT_texture_sRGB_decode to WebGL
   2. Introduce WEBGL_sRGB_drawing_buffer (depends on
   EXT_texture_sRGB_decode)
   3. canvas.drawingBuffer =
   gl.getExtension('WEBGL_sRGB_drawing_buffer).createDrawingBuffer(canvas.width,
   canvas.height) (that's kinda weird, better suggestions welcome)

?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20141124/081ff7dd/attachment.html>


More information about the public_webgl mailing list