Alpha blending issue
BlitzMax Forums/OpenGL Module/Alpha blending issue
| ||
Hi, I'm having a little problem with alpha blending on a FBO. I'll post some code later, but the here's the problem: I direct the drawing to an FBO. I draw a large quad (background) on the FBO. I draw a smaller quad with glColor4f(1,1,1,0.5) on top of that. I assign the FBO to an object and render it. It seems that the secon quad "punches a hole" through the background, and by that I mean that it writes to the destination alpha chanel. I'm using glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) Any ideas on how to fix this? |
| ||
Heh, looks like this fixed it:glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_COLOR) |