Funny, I actually explained this yesterday (though using GL_POLYGON_SMOOTH
instead). The problem is the same, however.
GL_LINE_SMOOTH
, GL_POLYGON_SMOOTH
and GL_POINT_SMOOTH
all suffer from one major problem that creates these blending artifacts. When you draw using these anti-aliasing techniques, aliased edges are blended together with the existing pixel in the frame buffer. This creates an order-dependent situation that can only be resolved by sorting your primitives back-to-front and taking a potentially serious performance hit due to overdraw.
When you see these white pixels, what is really happening is that the aliased edge is being blended with the only thing in your color buffer up until that time (the clear color).
If you really insist upon using point smoothing in this situation, you should draw all of your points twice. For best results, you might want to reverse the order you draw them in on the first pass and disable depth writes using glDepthMask (GL_FALSE)
, then on the second pass re-enable depth writes. Obviously this is going to suck from a performance perspective, but these non-fullscene anti-aliasing techniques are far from ideal to begin with.