Reputation: 5081
Basically I want the following blend function:
newFragColor = SrcColor * SrcAlpha * DstAlpha + DstColor * (1-(SrcAlpha * DstAlpha))
Can I achieve that somehow using glBlendFunc and glBlendEquation?
The left side of the addition is easy - for that I just need to premultiply the fragment color with the fragment alpha and then use GL_DST_ALPHA as the first parameter to glBlendFunc. But how can I achieve the right side of the addition?
Upvotes: 0
Views: 343