Separate blend equations for FBO color attachments

Hi

Is there any way to set separate blend equations to differend color attachments of one FBO.
(at least on nvidia 280 class cards with opengl 3.0 support)

Example:
I have fbo with 2 color attachments (GL_COLOR_ATTACHMENT0_EXT and GL_COLOR_ATTACHMENT1_EXT)
and the glsl shader that outputs to gl_FragData[0] and gl_FragData[1].

Now i want the first glsl output to be blended with attachment 0
(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA))
and the second output to be added to attachment 1
(glBlendFunc(GL_ONE, GL_ONE))

How to do the trick ? It is possible ?
I need to out a lot of quads, each should blend with one attachment and add to another - the fragment shader that calculates outputs is non-trivial - so running it 2 times is a big waste of computing power :stuck_out_tongue:

OpenGL can only enable or disable blending differently on each render target. There is no way to set different blend equations. I actually wrote a post about this myself:

http://www.opengl.org/discussion_boards/…5723#Post255723

Jan.

Sorry to bump, but I found this on Google and as of OpenGL 4.0 this is no longer the case!
See “Draw Buffers Blend”, i.e. the glBlendFunci() and similar functions