Z-fighting is a 3D rendering artifact in which two surfaces lying at the same or nearly the same depth flicker or show striped patterns because the renderer cannot determine which one is in front. It is also called depth fighting. It arises from the limited precision of the depth buffer, or Z-buffer, which stores a depth value for each pixel to resolve visibility.
Under perspective projection, depth precision decreases with distance from the camera, so the artifact appears more readily on distant surfaces. It is reduced by separating the overlapping surfaces, narrowing the range between the near and far clipping planes, increasing the bit depth of the depth buffer, or applying an offset to depth values.