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

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



On Tue, Sep 7, 2010 at 01:23, Gregg Tavares (wrk) <gman@google.com> wrote:
>
> (...)
> In that case the flag could be WEBGL_UNPACK_ALLOW_COLORSPACE_CONVERSION_ON_8BIT_LOSSLESS_IMAGES


I'm not really fond of a WebGL-specific toggle flag, and especially an
unpack toggle flag, it looks "out of place" IMHO. Also it seems that
this kind of toggle parameter has been deliberately avoided when
developing the OpenGL sRGB extension ([1] and [2])

>From an API perspective, would it be reasonable to rather support
EXT_texture_sRGBÂ- or at least a subset of it - Âand allow to just
specify GL_SRGB8 as tex*Image2D format arguments when one wants the
input image data color-corrected ?

The extension spec states the conversion to linear color space should
be performed at specification time, so there should be no issue for
the browser to perform the conversion when the extension is not
supported, similarly to other the format conversions already
supported. Also we'd be able to explicitly support GL_SLUMINANCE8 in
the same way (that might be useful for offline shadow maps).


[1] : "Adding new texture formats is the right approach."
[2] : "The ability to implement this extension in this manner provides
*one more justification to avoid a "toggle"* texture parameter for
sRGB conversion or not."


Regards,

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: