Esa
08-03-2005, 12:30 AM
I want to do additive blending using GLSL. With fixed pipeline I would use:
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
drawStuff()Is there any way to do this with GLSL? I tried using:
gl_FragColor += colorToAdd;doesn't produce correct results (I guess gl_FragColor doesn't contain the current framebuffer color). Is it possible to do this blending in a shader?
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
drawStuff()Is there any way to do this with GLSL? I tried using:
gl_FragColor += colorToAdd;doesn't produce correct results (I guess gl_FragColor doesn't contain the current framebuffer color). Is it possible to do this blending in a shader?