I am currently looking into alternatives to my current, somewhat slow but exact, OIT approach. Specifically, GL_SAMPLE_ALPHA_TO_COVERAGE to convert the alpha value into a per-sample mask.
// draw opaque objects glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE); glEnable(GL_SAMPLE_ALPHA_TO_ONE); glDisable(GL_CULL_FACE); // draw translucent objects
However, if multiple alpha-blended faces are behind one another (such as the back faces which I would want to be visible) I am only seeing the front most one. Is depth testing not done per sample? Can I force it to be done per sample? According to https://www.khronos.org/opengl/wiki/Depth_Test it should already be per sample.
Multisampling is enabled and works fine for everything else (my OIT shaders in fact do sorting per sample which might be a reason for the slowness). The FBO being drawn into is provided by Qt.