PDA

View Full Version : Layer composition, textures & alpha blending issue



viral
09-18-2009, 05:36 AM
Hey,

I am having trouble determining the appropriate arguments for glBlendFunction and GL_TEXTURE_ENV_MODE, such that textures that are the result of rendering some blended scene, can be recomposed to form a final scene.

The problems I am seing is where each layer is blending against the background (glClearColor), such that when I transfer the layer to a texture using glCopyTexture2D and layer map this back to a quad I am not getting the desired result. I believe I could acheive the correct result using fragment shaders, such that I overwrite background pixel, but blend with non background pixels, but I would like to achieve this using GL 1.5 or below.

Any help would be appreciated.