Fragment (computer graphics)

In computer graphics, a fragment is the data necessary to generate a single pixel's worth of a drawing primitive in the frame buffer.

These data may include, but are not limited to: As a scene is drawn, drawing primitives (the basic elements of graphics output, such as points, lines, circles, text etc.

In a typical case, a fragment may be discarded if it is farther away than the pixel that is already at that location (according to the depth buffer).

In general, a fragment can be thought of as the data needed to shade the pixel, plus the data needed to test whether the fragment survives to become a pixel (depth, alpha, stencil, scissor, window ID, etc.).

If the fragment is not totally opaque, then part of its background object could show through, which is known as alpha blending.