I’m trying to set the blending mode to additive blending using the following calls:
glBlendEquation(GL_FUNC_ADD) glBlendFuncSeparate(GL_ONE, GL_ONE, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
What I’m trying to achieve in the end is additive blending on colors, and normal alpha blending on the alpha channel. However, instead of my expected texture, I get a big white rectangle.
The expected result is something like this (using normal alpha blending):
My texture is completely white (the RGB channels are all 1.0), and the alpha channel is a plot of the values of a 2D gaussian kernel. It looks like this:
I have double checked that the texture is bound properly using qapitrace, works as expected. It also works as expected with normal alpha blending
glBlendEquation(GL_FUNC_ADD) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
as presented on the image of my expected result. Is my blending setup wrong?