Not tested, but a way to go as follows.
The built-in calculation that looks in OpenGL is as follows:
C = A*s + B*d
Where you can choose s and d.
Some algebra gives us
C = 1 - (1 - A) * (1 - B) = = 1 - (1 - B) + A*(1 - B) = = A*(1 - B) + B
Let be
s = 1 - B d = 1
and we get the desired value. Therefore, this should work:
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE);
source share