OpenGL Depth Buffer with transparency

Transparency requires that fragments are rendered in a specific order, either from back to front or front to back.

Specific approaches include:

  • render the polygons in a particular order (requires a topological sort, and may require splitting polygons to avoid circular dependencies)
  • depth peeling (multiple passes using render-to-texture and two depth buffers)
  • storing a linked list of fragments for each pixel and sorting the lists.