OpenGL : Keeping alpha in a render buffer

Posted by Cyan on Game Development See other posts from Game Development or by Cyan
Published on 2012-11-30T23:44:15Z Indexed on 2012/12/01 11:26 UTC
Read the original article Hit count: 178

Filed under:
|

In my current task, i need to render a texture into a render buffer, in order to work on it (apply special filters) there. The result is then considered a "new texture", which is later displayed.

This works fine, except when the texture contains some transparent/semi-transparent parts.

My current guess it that, within the render buffer, the texture is "merged" with a kind of "grey background". In this case, it obviously impacts the R,G,B color components of transparent pixels. I've yet to find a way around this.

Even manually assigning alpha after the rendering process doesn't save the day for semi-transparent pixels, which RGB are "tainted" by the grey background.

© Game Development or respective owner

Related posts about opengl

Related posts about textures