Hello to the OpenGL community!
When I render a texture with alpha components to a render target (FBO with texture attached), the result looks dark and incorrectly blended. Here’s a screen shot of what’s happening:
Both left and right textures are blended with the same blend equation and parameters, using fixed function blending (no shaders).
The texture to the left is blended to the frame buffer. The texture to the right is blended to the FBO.
As you can see, the texture (left) blended to the frame buffer looks as it should. However, the texture blended to the FBO (right) is dark and incorrectly blended.
When rendering non-alpha component textures, the effect is as desired, with no texture darkening, as is shown from this screen shot:
The texture color format attached to FBO is GL_RGBA8, and GL_BGRA.
It seems the texture blends correctly when I switch blending modes to GL_ONE, GL_ONE.
glBlendFunc( GL_ONE, GL_ONE );
Still stumped as to why. Anybody?