[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Weird alpha issue.
- To: Benoit Jacob <bjacob@mozilla.com>
- Subject: Re: [Public WebGL] Weird alpha issue.
- From: Steve Baker <steve@sjbaker.org>
- Date: Sat, 30 Oct 2010 12:05:43 -0500
- Cc: public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=sjbaker.org; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sjbaker.org; bh=vTiQZ IUOMui32V1JBCUc/PDTWH0=; b=EFRzgSCtAAg2YKlNZhnEtnAHQT2WC0FvceOyM tPL/IegclwayYIZbKmi+vPa3G7hi5hyTDBfixwIiCVfUYuNjyvduaPlxLoZ1KHOJ sR3a0YY7UEzvF81XzITgifT4KD40cj/YHRHmIW5orzXz9hQQJQYOVu94aMWjBPon aNi14U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=sjbaker.org; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sjbaker.org; b=ZxR3Ii8+3rQPK66BWF/BmUppypUZ7bwcB6Ry8STPLyqyU1jUzUUgEpZS8wIm3 8s/40LDTpwg0ryczqu3FU7G6D9eG1JN3pS8gAatDtTk4KJOdengZmlBWU4r0lugK DRxCowWZMT2yosOc7cgN0ifZmYMQ5ovnsm/QagWhQUKiYY=
- In-reply-to: <1062687679.229913.1288454898223.JavaMail.root@cm-mail03.mozilla.org>
- References: <1062687679.229913.1288454898223.JavaMail.root@cm-mail03.mozilla.org>
- Sender: owner-public_webgl@khronos.org
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100520 SUSE/3.0.5 Thunderbird/3.0.5
I have Minefield set up to auto-update and it actually updated just as I
started typing this email - so I guess I have the latest! ...and the
color is still much darker than in Chrome.
I took a pair of side-by-side screenshots with the latest versions of
both browsers:
http://www.sjbaker.org/tmp/smoke_differences.png
(It's kinda hard to see the smoke on the Minefield side - but it's much
more obvious in motion).
If it helps, the texture map is in:
http://www.sjbaker.org/tmp/Smoke.png
-- Steve
On 10/30/2010 11:08 AM, Benoit Jacob wrote:
> What's your Minefield build? Two weeks ago, I landed important texture fixes that could be related to that. Please try with the latest nightly:
>
> http://nightly.mozilla.org/
>
> Benoit
>
> ----- Original Message -----
>
>> I'm running some particle system tests - using an RGBA .png image with
>> fuzzy mid-grey translucent smoke puffs. There are lots of particles
>> layered on top of each other.
>>
>> What's odd is that the smoke puff is much lighter in color on Chrome
>> than it is on Minefield - even with both browsers running side-by-side
>> on the exact same Win7/32bit/nVidia machine displaying the exact same
>> scene. Everything else in the scene looks utterly identical in the two
>> windows.
>>
>> I'm kinda suspecting some funky thing going on with pre-multiplied
>> alpha. Is someone messing with my texture?
>>
>> DETAILS:
>>
>> The setup for drawing is:
>>
>> gl.enable ( gl.DEPTH_TEST ) ;
>> gl.depthMask ( false ) ;
>> gl.enable ( gl.BLEND ) ;
>> gl.blendFunc ( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA ) ;
>>
>> ...with everything else left at default values.
>>
>> The frag shader says:
>>
>> float4 color = texture2D ( fire, UV ).rgba * (1.0-smokeAmount) +
>> texture2D ( smoke, UV ).rgba * smokeAmount ;
>> color.a *= timeVaryingAlpha ;
>> gl_FragColor = color ;
>> }
>>
>> ...and in this case, smokeAmount is 1.0 (so we should see only the
>> smoke
>> map...and that works) and timeVaryingAlpha varies between 0.0 and 1.0
>> as
>> you'd expect.
>>
>> My image 'onload' function says:
>>
>> 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 ) ;
>>
>> Help!
>>
>> -- 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:
>>
-----------------------------------------------------------
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: