the pbuffers work fine, but with the blending i get a black QUAD and the clouds in the texture have the correct color.
i have also tried other blending parameters, but they didn’t work.
do you know some method to make the quad where i render the cloud in translucent?
thanks
yeah, you have defined srcGL_ONE + dstGL_ZERO
this means, your source(=fragment color) gets multiplied with one, and your destination(=FRAMEBUFFER) is multiplied with zero.
if your texture has an alphachannel defined use:
glBendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)
for additive blending use: glBendFunc(GL_ONE,GL_ONE)
yes that is the problem
if i use glBlend(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
or glBlend(GL_ONE,GL_ONE)
the colors are different as if i draw the clouds direct in the scene and they need to have exactly the same color because i render the distant clouds in a octagonal ring of pbuffers and when they are within the rings radius they are rendered in the scene as 3d volumes. So there should be no difference in color.
but i dont know how to do this
how do you wirte the clouds into the pbuffer ?
are using additive blending or GL_SRC_ALPHA/GL_ONE_MINUS_ALPHA ?
are you writing into the alpha-channel of the pbuffer ?
anyway, i suggest you to search the web(google) and this forum for “cloud rendering”