Posted by Frank C. on January 21, 2004 at 15:33:24:
On 21-Jan-04, at 4:33 PM, Seth Willits wrote:> On Jan 21, 2004, at 11:14 AM, Frank C. wrote:
>
>> Back to your problem: If you can live without additive blending, just
>> use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) in
>> IRTransparent.c, instead of glBlendFunc(GL_ONE,
>> GL_ONE_MINUS_SRC_ALPHA).
>
> I'll cheerfully expose *my* OpenGL ignorance here; What would be the
> difference?With the source set to GL_SRC_ALPHA you're combining the texture's
alpha component with the frame buffer and the fog colour. So
transparent alpha pixels have no affect (buffercolour+fogcolor+0 =
buffercolour+fogcolor). With GL_ONE you're combining (1,1,1) (white)
with the frame buffer and fog color (buffercolour+fogcolor+1 =
bright!). Technically it's not all addition but that illustrates the
point.Frank.