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

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



On 2010-09-07 04:53, Mark Callow wrote:

On 07/09/2010 02:23, Gregg Tavares (wrk) wrote:

...

WebGL already specifies that if the incoming format is a lossless 8bit format (ie, an 8bit png) that the bits in the file must be passed straight through, no conversion. There are conformance tests for this. This is to support getting non-image data into WebGL.
Why should losslessly compressed files be treated differently than lossy compressed files? Just because they are more likely to be used for non-image data does not seem like sufficient reason. There are a lot of PNG images out on the web. People creating PNG files for, e.g. normal maps, can easily write a gAMA chunk indicating the gamma value is 1.0.

What would it mean if we said that jpeg or some other lossy format has to pass the values through "untouched"? What precision and which IDCT algorithm should be used to consider the pixels "untouched"? Two conforming jpeg decoders can produce different data, the requirement for conformance is that the PSNR of the decoded image and the original is small enough iirc.


Avoiding that issue is the reason it only applies to lossless images.

That limitation is btw mostly to keep browsers from doing premultiply alpha + un-premultiply alpha before uploading the data to gl, color space was not considered when it was added.

//Tim

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