[Public WebGL] Compositing with HTML

Chris Marrin [email protected]
Fri Jan 8 16:56:18 PST 2010

On Jan 8, 2010, at 4:52 PM, Gregg Tavares wrote:

> On Fri, Jan 8, 2010 at 10:38 AM, Chris Marrin <[email protected]> wrote:
> On Jan 8, 2010, at 10:24 AM, Kenneth Waters wrote:
> >> If you do this test in WebKit it seems to do the right thing. Over white the clear color looks the same because of clamping, but over other colors the red is too bright. But if you do this in Firefox, it looks wrong. Over white, you get gray! In fact, any red component over 0.5 gives you the same result. So it looks like when Firefox gets a color component over 1.0, it replaces the entire color with black or something. Is this a bug in Firefox?
> >
> > I think this is undefined behavior.  My personal preference is that
> > the color channels are clammed to alpha, unless its specified
> > differently elsewhere.  Seems like this should go into section 5.1.1
> > of the spec.
> I believe this behavior is specified in the HTML spec, so I don't think we need to make any additional definitions here.
> Just for my own personal clarification. Clamping to alpha is not what the current implemenations do (maybe firefox does this?)
> The comment above seems to be suggesting that all implementations clamp to alpha.

What I mean by that is that color always clamps to 1.0, so if you give oversaturated colors (1.0 when alpha is 0.5, for instance), and blending results in a color greater than 1.0, the result is clamped to 1.0. I believe that is what the HTML compositor specifies and that's what WebKit does when compositing. I think Firefox is doing something different. But I'll wait for Vlad to chime in...

[email protected]

You are currently subscribe to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:

More information about the public_webgl mailing list