I am trying to achieve additive blending with point sprites. When the sprites overlap, all I get is solid red, when I expect to get a smooth blend from red->yellow->white. My sprite texture has all four channels set equal, with portions being white and others transparent.
I set up blending as such:
glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE);
My fragment shader is as follows:
vec4 texCol = texture(pointsprite, gl_PointCoord); colorOut = vec4(texCol.rgb * vec4(ocolor, 1.0).rgb, texCol.a);
pointsprite is a sampler2D and
ocolor is `(1.0, 0.0, 0.0)
My background is cleared as
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
I have tried some of the various methods suggested in this question, none offering any results. I can verify my alpha channel is correctly loaded from my image into my texture.
EDIT: Missed mentioning that my intention is for clusters of point sprites with the same pigment (red) to additive blend to yellow and white.