I recently added a sky to my application, and while testing I simply wrote red pixels wherever the sky shader was invoked. When doing this I noticed that a few pixels inside solid geometry turned red, and they vary depending on camera angle. The way I render the sky is that I render a fullscreen triangle at the far plane and use the depth buffer for early z-rejection, only shading fragments where the far plane is visible (i.e. no geometry has been rendered). This led me to believe that the depth buffer still contained its clear value at those texels.
It turns out that the GBuffer have holes where a fragment has not been generated, and these holes seem to appear where two triangle edges meet. This is the final image. It's quite dark, but you're looking at a wall with two windows and a slanting roof above it (see the image below for a clearer view as to where the roof begins). To the right is a pillar. Notice the few pixels in a row where the wall meets the roof between the two windows (you might have to view the full images to see it clearly).
[attachment=29004:finalimage.png]
Here are the normals of the GBuffer. Notice that the same erroneous texels are grey, which is the clear value (I clear to 0.5 because in [0,1] that corresponds to the zero vector in [-1,1]).
[attachment=29005:gbuffernormals.png]
I understand that a fragment is generated by the rasterizer if the center of the pixel is contained in the triangle, and for this reason it seems that the center is inside neither of the triangles. Could this happen if due to precision problems the triangle edges are very close to the center of the pixel but not quite overlapping it? Note that this is a very rare case with several pixels in a row; usually it's a few single pixels scattered all over the image at places where triangle edges meet.
Has anyone else stumbled upon similar issues? How could these holes be fixed? If I have a dark indoor environment and a bright sky it's a very annoying artifact when a few bright pixels appear and disappear at random locations when moving the camera.