I'm looking for a way to blend a source texture containing an alpha channel, onto the framebuffer, modulated by an extra alpha.
that is, insted of just
dst = a*src + (1-a)*dst
I need:
dst = (a1*a2)*src + (1-(a1*a2))*dst;
where a1 is the texel alpha value, and a2 is a constant value for the whole texture.

How can I achive this using OpenGL ES 1.0?

[ January 19, 2005: Message edited by: Olof Hedman ]

bentlegen

01-19-2005, 06:38 AM

Set flat color shading and call glColor4f(1.0f, 1.0f, 1.0f, a2). This assumes you're blending with the frame buffer using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA). Should blend according to your equation.