I did this a long time ago, but it’s sort of obscure and difficult to describe.
I am drawing a mesh with blending enabled, and after the blend is calculated, I want to maximum of the source and dest alpha values to be written to the color buffer, after the blend is performed. I think there was some special function to control how the output alpha value is calculated, independent from glBlendFunc. Do you know what this is?
glBlendFuncSeparate lets you specify different blending functions for the colour and alpha components. glBlendEquation and glBlendEquationSeparate let you specify how the source and destination values are combined (the default is addition, but you can choose subtraction, minimum or maximum).
Oh okay, that must have been it. If you are rendering transparency to a separate buffer like for heat haze, then is makes sense to take the maximum of the alpha values.