[Public WebGL] gamma/color profile and sRGB

Florian Bösch [email protected]
Wed Nov 26 05:41:28 PST 2014

OpenGL ES 2.0 doesn't have glBlitFramebuffer (but ES 3.0 has).
glBlitFramebuffer can be substantially slower than a quadpass. It's also
capable of performing interpolation, which suggests that at least some
conversion rules still apply.

The OpenGL ES 3.0 specification states in section 4.3 Reading and Copying

When values are taken from the read buffer, if the value of FRAMEBUFFER_-
> ATTACHMENT_COLOR_ENCODING for the framebuffer attachment corresponding to
> the read buffer is SRGB (see section 6.1.13), the red, green, and blue
> components
> are converted from the non-linear sRGB color space according to equation
> 3.24.

FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING is framebuffer attachment tied. It
can be queried by GetFramebufferAttachmentParameteriv but it can only be
set by attaching an sRGB texture.

On Wed, Nov 26, 2014 at 2:19 PM, Mark Callow <[email protected]> wrote:

> On Nov 25, 2014, at 4:58 PM, Florian Bösch <[email protected]> wrote:
> 2. Spec out a new context creation attribute for WebGL 2.0 adding
>> support for allocating an sRGB drawing buffer
> Which can fail unless you have support for TEXTURE_SRGB_DECODE so you can
> read out raw values from an sRGB texture for use in a non-linear color
> space compositor.
> What about glBlitFramebuffer? IIRC correctly that does not do any
> conversions. I don’t have time to check the OpenGL spec. right now. Sorry.
> Regards
>     -Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20141126/8631d127/attachment.html>

More information about the public_webgl mailing list