Original Post
Hi,
I'm having a hard time trying to figure out the correct blend function I want.
I want the source color to be multiplied by the alpha of the destination, and this I already achieved with glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA), so this way the source will be painted according to the alpha of the dst.
What I want as well is the source color to be multiplied by the source alpha, for cases where the source is a png texture with transparency. The blend function for this would be glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
So, if I want both of them together, multiplying the source color by the destination alpha and the source alpha as well, I think I would want something like glBlendFunc(GL_DST_ALPHA * GL_SRC_ALPHA, ...).
Is there anyway to achieve this?
Thank you :)
I'm having a hard time trying to figure out the correct blend function I want.
I want the source color to be multiplied by the alpha of the destination, and this I already achieved with glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA), so this way the source will be painted according to the alpha of the dst.
What I want as well is the source color to be multiplied by the source alpha, for cases where the source is a png texture with transparency. The blend function for this would be glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
So, if I want both of them together, multiplying the source color by the destination alpha and the source alpha as well, I think I would want something like glBlendFunc(GL_DST_ALPHA * GL_SRC_ALPHA, ...).
Is there anyway to achieve this?
Thank you :)