Compositing
Compositing with Alpha
- Porter-Duff compositing
- OpenGL does not premultiply color by alpha
- Use glCopyPixels or color matrix imaging extension
- over: glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE)
- under: glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
- in: glBlendFunc(GL_DST_ALPHA, GL_ZERO)
- out: glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_ZERO)