# Broken alpha of two-sided OpenGL mesh

How do I get rid of this alpha transparency artifacting with classic fixed function OpenGL?

I tried all kinds of settings but I'm not sure why it's good in the upper half of the mask but not in the lower half.

alpha illustration | 1.7M GIF

I have a two-sided concave mesh and want to fade out the edges with an alpha vector on the vertex colors. I get the same artifact with an RGBA texture also.

• creepy .gif >.< – Nick Rolando Feb 18 '11 at 17:16

You can't do this in a single pass.

Well, maybe I should clarify.

If you look at the way a triangle rasterizer works, is that it takes a bunch of triangles and puts them on the screen. But, for each pixel, it checks its z value to a value in the z-buffer. If the z of the pixel that wants to be drawn is greater than the pixel that was already there, the z in the z-buffer is set to that value and the pixel on the screen is set to that pixel.

However, you might be able to work around this, like so:

glDepthMask(GL_FALSE);

// render polygons