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

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



Thatcher Ulrich wrote:
> 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.
>   
Yes - that's absolutely true - but you have to realize that this is
because they aren't being used for 3D rendering. That's about to change.
> Linear with 8-bit color depth is not a good interchange format; that's
> why virtually nobody uses it.
>   
Nobody ON THE WEB uses it.  In computer games and simulation it's what
virtually everybody uses.  So why is that?

* When you need to take a photo and paste it onto a screen - you store
it in sRGB space so you can splat it onto the screen with no intervening
math whatever.  It's an efficient use of limited network bandwidth and
CPU horsepower.  Everyone wins.  That's also why JPEG is so popular.

* When you take an image and push it through a 3D renderer that's doing
a TON of hideously expensive math - you store it in the color space best
suited to doing heavy duty math using cheap hardware (which is linear)
and you pay the price to convert the results into sRGB (to "gamma
correct" it) at the very last possible moment.  Hardly any game or
simulation people use JPEG for that exact same reason.

We're about to bring those two worlds smashing together...and that's why
there is an issue here.

  -- Steve

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