One of the most useful blending functions is
(GL_ONE, GL_ONE_MINUS_SRC_ALPHA). This allows to do all the blending "effects" that we need (color filter, additive,...) in one pass. Unfortunately, there is one thing missing for this to be really true: colored alpha. If alpha (actually opacity) would be RGB, it would define how the fragment should filter the color seen through it. This is actually the only blending function available in RenderMan since no other is needed. To have the same behavior as the common (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), you just need to multiply the color by the opacity at the end of your fragment shader. All we need is that a shader should output two vec3: gl_FragColor and gl_FragOpacity and everything should be fine.
Another way to do it is with the ATI_draw_buffers extension. With this extension, a fragment shader can output more than just a vec4 (through gl_FragData[]). If blending shaders would exist, we could combine two vec3 from two draw buffers to have the same behavior.
One or the other way would be great.



