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.


1 Answer 1


It sounds like something is wrong with your blend modes or shaders. When you initially copy the texture to the render target, you should disable blending, which will just copy all the RGBA components to the render target without modification. Then, any filters you apply will need to handle alpha appropriately, whatever that may mean for the specific filter.

  • \$\begingroup\$ Actually, i need some of these textures to be stretched and/or bilinear filtered.... \$\endgroup\$
    – Cyan
    Commented Dec 1, 2012 at 1:21
  • \$\begingroup\$ @Cyan That's fine. That doesn't have any effect on blending. Bilinear filtering != blending. \$\endgroup\$ Commented Dec 1, 2012 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .