Hi! I try to implement blending of several semitransparent screen space quads with case that I take maximum alpha value from current framebuffer alpha and fragment alpha and that value is used in traditional transparent blending calculation:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
So in result I need something like:
glBlendFunc(GL_MAX_ALPHA, GL_ONE_MINUS_MAX_ALPHA);
As far as I understand this can be done with framebuffer ping-pong in shaders and manual color calculation. But in my case there might be many screen space objects, so it will affect performance.
Any advices?