Clarification over the use of the term "fragment"?

Neeyik

Homo ergaster
Veteran
Three things:

(1) Fragment vertex processing.
(2) OpenGL fragment processing.
(3) Matrox's fragment anti-aliasing.

With reference to the use of the term "fragment", are these 3 things related at all, or is it a case of:

(1) fragment means "several bunches of shader instructions"
(2) fragment means "pixel"
(3) fragment means "whatever Matrox wants it to mean"
 
Fragment means pixel (or, more accurately, a fragment is a data structure that the rasterizer generates).

1. "Fragment vertex processing" means doing processing on vertices in the fragment shader. Instead of rendering to screen resolution, imagine having a 128-bit output buffer with as many entries as there are vertices in a model. In this way, you can do vertex processing (transformations, lighting, deformation, etc.) with all of the capabilities that are normally reserved for pixels. Then, after all the vertices have been run through the fragment shader, the resulting floating-point color buffer is copied into a vertex buffer. Or, that's the only logical meaning I can think of for this term.

3. "Fragment anti-aliasing" refers to anti-aliasing that is performed on a per-fragment basis, rather than on the whole screen.
 
Ah ha - a quick read of Matrox's document on their FAA reveals what they mean by "fragment":

Matrox FAA-16x identifies fragments by inspecting triangle edge pixels with 16x sub-pixel accuracy to determine their pixel coverage: a pixel
is either not covered, fully covered, or partially covered (i.e. a fragment). This information is then used to determine whether the pixel should
be discarded, placed in the frame buffer, or sent to the FAA-16x unit. All non-fragment pixels are immediately written to the frame buffer, while
all fragment data is collected and stored in a fragment buffer. The fragment buffer maintains fragment lists, which contain information about a
particular fragment pixel. Specifically, the fragment list stores sub-pixel coverage and color information for each of the edges that intersect the
pixel. The FAA-16x unit continuously updates the fragment buffer to determine the final representation of true scene fragments. The fragments
are then combined and the final pixels are written to the frame buffer to complete the frame.
 
(2) OpenGL fragment processing.

OpenGL spec:
"A grid square along with its parameters of assigned colors, z (depth), fog coordinate, and texture coordinates is called a fragment..."

Calling a fragment a pixel is an oversimplifications, because
A. The fragment may not reach the framebuffer if it fails depth/stencil test etc.
B. When multipassing you are blending several fragments to the same pixel.

I guess you could say that a fragment is the object that is calculated in a per-pixel operation.
 
Or, "Fragment is the collection of data for a given XY location for producing a pixel", or...

However, Matrox seems to mean just "portion", not "fragment" in the traditional CG sense.
 
Many thanks to Tobbe for that clear explanation - now just for fragment vertex shading and while I'm grateful for gking's effort, I'm not convinced that it means using the fragment processing section of a chip in order to perform vertex operations.
 
Back
Top