[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] gamma/color profile and sRGB

On Mon, Nov 24, 2014 at 7:58 AM, Florian Bösch <pyalot@gmail.com> 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.


"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."
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)