When rendering normally to the screen, I would use:
Now, I'm trying to generate an FBO that I later render to the screen, and which has translucent items in it. I first clear the FBO:
GL.ClearColor(1.0f, 1.0f, 1.0f, 0f) ;
If I now render to my FBO using:
Then this doesn't work for translucent content, because it blends with the white I cleared the FBO to in the first place.
Another thing I've noticed is that if I use BlendingFactorSrc.SrcAlpha at all, then the transparency is "doubled up". As in, if I were to render a texture (e.g. a bit of text) to my FBO, and then render my FBO using GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha) to the screen at 100% opacity, the text will appear narrower because the edge opacity will be reduced.
So far the best results I've obtained have been rendering to the FBO using:
..and then rendering the FBO using GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha).
This makes sense in that my FBO now contains the exactly what the texture I rendered to it contained previously, so I'm effectively rendering the original texture.
The major floor with this is that I cannot have overlapping items in my FBO.
The behaviour I would like (which I'm starting to realise may actually be impossible) is that, if I render two textures to my FBO and then render my FBO to the screen, it will look the same as if I were simply to have rendered both textures directly to the screen. Is this even possible? - Having now looked at the maths behind blending I'm starting to believe that it's not possible, but perhaps there is some trickery that can be used?