Hello,
in an earlier version of my app, I rendered billboards with cloud textures that contain alpha directly to the screen after everything else has been rendered. That worked fine. I used
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
But now I’m rendering all those billboards into a pbuffer with alpha and in most cases, I’m rendering the generated pbuffer texture, not the billboards. However, I don’t know how to set the right blending modes, because it always doesn’t look how it should.
Questions:
- What should be the clear color for my pbuffer?
glClearColor(0,0,0,0)? glClearColor(1,1,1,0)? - What blending mode should I use to render the billboards
into the pbuffer?
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ? - What blending mode should I use to render the pbuffer?
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ?
The above doesn’t work because all billboards tend to be a little bit black where it’s alpha is not 1. Also the white isn’t visible enough, because the alpha value of e.g. 0.5 is applied TWICE
Any ideas?
Regards,
Lyve