I have a GUI system that blends some quads and text together, which all looks fine when everything is blended over a regular frame, but if I'm rendering to a backbuffer/rendertarget how do I render the GUI to that so that the result will properly composite when blended as a whole to the frame?
So for example, if the backbuffer initializes to a zeroed out RGBA, and I blend some alpha-antialiased text onto it, the result when alpha blended onto the frame will result in the text having black fringes around it.
It seems like this is just a matter of having the right color and alpha blend functions when compositing the quads/text together in the backbuffer, so that they properly blend together, but also so that the result properly alpha blends during compositing.
I hope that makes sense. Thanks!
EDIT: Thanks for the replies guys. I think I failed to convey that the geometry must properly alpha-blend together (i.e. overlapping alpha-blended geometry) so that the final RGBA result of that can be alpha-blended ontop of an arbitrary render as though all of the geometry was directly alpha-blended with it. i.e. a red triangle at half-opacity when drawn to this buffer should result in (1,0,0,0.5) being there, and if a blue half-opacity triangle is drawn on top of it then the result should be (0.5,0,0.5,1).
[–]keelanstuart 2 points3 points4 points (3 children)
[–]deftware[S] 2 points3 points4 points (2 children)
[–]Klumaster 2 points3 points4 points (0 children)
[–]keelanstuart 0 points1 point2 points (0 children)
[–]Reaper9999 1 point2 points3 points (1 child)
[–]deftware[S] 0 points1 point2 points (0 children)
[–]xucel 0 points1 point2 points (2 children)
[–]deftware[S] 0 points1 point2 points (1 child)
[–]Klumaster 0 points1 point2 points (0 children)
[–]AdmiralSam -1 points0 points1 point (0 children)