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

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



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 Pixels:

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 <khronos@callow.im> wrote:

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