I’m working on television VR applications where both the colour and alpha components from the frame buffer are passed downstream for keying/compositing.
This is because I need to do back to front rendering, based on destination alpha. So after rendering the following needs to be true:
the alpha component in the frame buffer must represent the opacity of the computer’s output;
the colour components must always be full intensity - since it is the alpha component that will be used to fade content out downstream.
The upshot is, I need an extra mode for glBendFunc, such as:
I’ve just discovered the OpenGL 1.4 specification which seems to provide the means to do it:
glBlendFuncSeparate() on P169 of the specification.
I guess I’ll just have to wait for someone to release drivers that support it … unless anyone can think of a way to achieve the same effect without having to render multiple passes, masking colour/alpha bits in the frame buffer!