PDA

View Full Version : Gritty deposit on FBO composited textures!



kingc8
08-27-2010, 07:31 AM
Hello,

Has anyone noticed (that on Nvidia hardware) when you copy a texture with alpha onto another texture, the imposed image has the backbuffer color in it?

Can that be avoided?

I've attached a picture to show the difference between a textured quad on top of another textured quad, and another single quad with a texture FBO'd onto it.

Thanks,

Cameron

ZbuffeR
08-27-2010, 10:57 AM
Sorry I have a hard time understanding and seeing what is your problem.

kingc8
08-28-2010, 06:40 AM
If you look at the edge of one of the smiley faces you may see a dark edge to it.

This smiley face has been added to the texture below using the FBO render-to-texture.

When I change the color of the back buffer, the edge matches it's color.

That is to say, textures with alpha added to another texture by render-to-texture (FBO) show back buffer color where alpha exists in the added texture.

In the included image, the background has been set to black, and that can be seen around the edge of one of the faces. Look closely to see it.

ZbuffeR
08-28-2010, 01:55 PM
Well background color gets stored, big news.
Read on pre-multiplied alpha by Tom Forsyth, it is an eye opener.
And always render blended stuff on black background to composite it easily as premultiplied alpha.