We have always believed that true transparency was an hard thing to code. Yesterdeay a coworker suggested the following trick:
Actually, in OpenGL rendering both opaque (alpha=1) and transparent
(alpha<1) objects in the same scene is quite easy: First you draw all the
opaque objects, with depth buffer in normal operation. Then you toggle the
depth buffer read-only (by glDepthMask(GL_FALSE)), draw the transparent
objects and make the depth buffer writable again afterwards
(glDepthMask(GL_TRUE)). There is should be no need for sorting objects by
their viewpoint distances.
What do you think?