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

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



On Sun, Sep 5, 2010 at 7:51 AM, stephen white <steve@adam.com.au> wrote:
> On 05/09/2010, at 8:26 PM, Thatcher Ulrich wrote:
>> It seems to me there are two unresolved questions for WebGL 1.0
>
> I'm not sure that my point was understood, so I'll try again...
>
> When a browser composites an image onto the page, that image is the entire block of pixels. The browser can have simple rules because of that.
>
> When WebGL draws to its canvas, it is using a number of images within the block of pixels. Therefore the number of different images may have different colour spaces and/or gammas.
>
> The additional complexity is coming from multiple images used together, which is not a problem that simply displaying an image had to worry about.
>
> As far as I can work this out, Steve Baker's suggestion of an option to reverse-map back to a linear colour space is the only mathematically valid option.
>
> In practical terms, this would work out to a "WEBGL_MAP_TO_LINEAR" loading time option that doesn't do any work for linear PNGs but does fix up colour space JPGs.

Just a point of clarification/correction: PNG has the ability to
specify linear, but the vast majority of PNGs in the known universe
(i.e. nearly every PNG on the web) are sRGB or equivalent.

Linear with 8-bit color depth is not a good interchange format; that's
why virtually nobody uses it.

-T

>
> If the option isn't set, then the JPGs are not touched and it's up to the programmer to do what they think is best.
>
> --
>  steve@adam.com.au
>
>
> -----------------------------------------------------------
> 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:
>
>

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