title: Order independent transparency in opengl
body: <p>I have a scene that contains both opaque and transparent objects. I split them into 2 groups, opaque and transparent, and sort the opaque from front to back and the transparent from back to front. I turn on the depth buffer writes and the depth test and draw the opaque items from front to back. Then I turn off the depth writes keep the depth test ON and draw the transparent items from back to front.</p>
  
  <p>This all works great but from what I understand I could be drawing transparent items without any specific order. I've gone through articles like this one <a href="http://www.openglsuperbible.com/2013/08/20/is-order-independent-transparency-really-necessary/" rel="nofollow noreferrer">http://www.openglsuperbible.com/2013/08/20/is-order-independent-transparency-really-necessary/</a> and saw that order independent transparency can be achieved by changing the blending function... But I just can't really comprehend this. </p>
  
  <p>I tried using those blending equations that are suggested there but I get the wrong combined color for the transparent items that overlap, unless I use the usual (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
  Is this really as simple as it looks there? Am I just missing something simple?</p>