I need my render result to contain valid alpha so I can later take my output and hang it in front of some other graphics and blend correctly.
An object with a=0.5 should output a=0.5, but two objects both with a=0.5 rendered in front of each other should result in a=0.75. First lets 50% of the light from the back through and the next lets 50% of the 50% (being 25%) through so a=0.75.
This gives a blend like
a = 1 - (1-src)(1-dst) or in the example 1-0.50.5=0.75
… but I do not see how I specify this blend. Using separate blending i have
An object with a=0.5 should output a=0.5, but two objects both with a=0.5 rendered in front of each other should result in a=0.75. First lets 50% of the light from the back through and the next lets 50% of the 50% (being 25%) through so a=0.75.
It would be easier (read: possible) to reverse the meaning of alpha on your end. Instead of alpha meaning “% of light blocked,” it should mean “% of light emitted.”
This way, all you need to do is multiply the source alpha by the dest alpha. And that is easily done. When you need to use “% of light blocked,” you can use 1 - alpha.
I am sending my resulting rgba to a separate videocard (actual sdi video) and I do not know of a setting that will invert the alpha in hardware. This would then mean that I had to do it myself and fear it would be too involved to render my entire output to a texture, pass it to a shader and let it reverse the alpha.
Do you have any suggestions as to how I could otherwise accomplish this?