I’m rendering in to a texture. I have some background colours, and the drawing some antialiased lines over the top. Problem is, when I draw the antialiased line, the pixels that are blended end up blending the alpha channel as well.
Ideally, I need to somehow seperate the blending of the alpha channel, so the colours can be blended using
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
But the alpha channel needs
glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
Is there away to do this?
Alternatively, I would settile for some way to disable writing to the alpha channel temporarily, so it can just remain at the original block-colour alpha, but that’s not ideal - eventually, I might like to have antialiased lines drawn over transparent sections of the texture.
Any thoughts?