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

Re: [Public WebGL] Gamma correction and texImage2D/texSubImage2D



On Fri, Sep 3, 2010 at 23:51, Chris Marrin <cmarrin@apple.com> wrote:
AFAIK, gamma correction is done to make images look right on the selected display. It has nothing to do with data in the source image. I believe some images might have color correction information in them, but that's different from gamma correction.

I think this contradicts the related paragraph in the canvas 2D context spec :
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#color-spaces-and-color-correction

Canvas 2D is clearly supposed to perform gamma correction only on images that have their own color correction information, I assume WebGL should only do color/gamma correction when unpacking textures under the same rule.
This would actually render the UNPACK_* parameter almost useless as it could (and probably should) be the default. If developers do not want gamma correction they just have to use images without color correction information in them (which would already be the case for any non-diffuse texture anyways).

Regards,