Skip to content

Instantly share code, notes, and snippets.

@erikccoder
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save erikccoder/b2cc02c0942dcbf18e5f to your computer and use it in GitHub Desktop.

Select an option

Save erikccoder/b2cc02c0942dcbf18e5f to your computer and use it in GitHub Desktop.
OpenGL accumulate alpha drawing in FBO
glEnable(GL_BLEND);
//glBlendFuncSeparate(GL_ONE, GL_SRC_COLOR, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glBlendFuncSeparate(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA,GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
//draw
glDisable(GL_BLEND);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment