[Public WebGL] gamma/color profile and sRGB

Kenneth Russell [email protected]
Mon Nov 24 16:32:54 PST 2014


On Mon, Nov 24, 2014 at 1:20 AM, Florian Bösch <[email protected]> wrote:
> 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:
>
> Introduce EXT_texture_sRGB_decode to WebGL
> Introduce WEBGL_sRGB_drawing_buffer (depends on EXT_texture_sRGB_decode)
> canvas.drawingBuffer =
> gl.getExtension('WEBGL_sRGB_drawing_buffer).createDrawingBuffer(canvas.width,
> canvas.height) (that's kinda weird, better suggestions welcome)
>
> ?

It would be more effective to do the following instead:

1. Figure out the interactions with WebGL 2.0 / OpenGL ES 3.0
2. Spec out a new context creation attribute for WebGL 2.0 adding
support for allocating an sRGB drawing buffer
3. Define a new extension for WebGL 2.0 exposing this functionality

Having sRGB support in the core spec and in the core WebGL 2.0
implementation will make it much easier to add this support.

On the Chrome project at least we're trying to focus on getting a
WebGL 2.0 prototype out and avoid getting derailed by adding more
features to the WebGL 1.0 implementation.

-Ken

-----------------------------------------------------------
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------





More information about the public_webgl mailing list