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

Re: [Public WebGL] Weird alpha issue.



----- Original Message -----
> ----- Original Message -----
> > On 10/31/2010 10:26 AM, Benoit Jacob wrote:
> > > ----- Original Message -----
> > >
> > >> Todays' version:
> > >>
> > >> Build identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre)
> > >> Gecko/20101031 Firefox/4.0b8pre
> > >>
> > >> ...didn't fix anything.
> > >>
> > > Yes, in my last email I said tomorrow's version.
> > >
> > Ah! I assumed you'd sent the email last night. Sorry.
> > > Are you doing any pixelStore() calls? Are you setting the
> > > PREMULTIPLY_ALPHA parameter there?
> > >
> > I do this in the "onload" function - but that's the only pixelStore
> > call:
> >
> > image.onload = function ()
> > {
> > gl.bindTexture ( gl.TEXTURE_2D, texture ) ;
> > gl.pixelStorei ( gl.UNPACK_FLIP_Y_WEBGL, true ) ;
> > gl.texImage2D ( gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA,
> > gl.UNSIGNED_BYTE, image ) ;
> > gl.generateMipmap ( gl.TEXTURE_2D ) ;
> > gl.bindTexture ( gl.TEXTURE_2D, null ) ;
> > pendingTextures -- ;
> > } ;
> 
> OK, no alpha premultiplication there. So no premultiplication should
> happen. If you can run Minefield in a profiler showing the list of all
> functions that are called, you should then NOT see any symbols of the
> form ...packRGBA8To...Premultiply... (where the ellipsis ... match any
> string). If you see any such Premultiply symbols, that means that we
> call the wrong texel packing function, wrongly premultiplying, causing
> transparent textures to be darker than they should.

Sorry, these functions are inlined, so you can't see them anyway.

I guess the only way forward is to get a testcase (unless you can run a debug build of Minefield)

Benoit

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