Previous | Next --- Slide 46 of 53
Back to Lecture Thumbnails
kayvonf

The graphics pipeline operates on four major entities: vertices, primitives (such as points, lines, and triangles), fragments, and screen samples. (Although not shown here, we should really consider screen pixels to be a fifth major entity as well).

  • Vertex processing computes the normalized coordinate space position of vertices
  • Vertices are grouped together into the pipeline to form primitives, like triangles.
  • Triangles are culled, clipped, and processed to obtain edge/attribute equations.
  • Triangle coverage is sampled, and for each covered sample a fragment is generated by rasterization. A fragment is just a record representing the values of interpolated triangle attributes at this sample point.
  • Fragment processing computes the color of the triangle at the sample point corresponding to the fragment.
  • Screen sample operations include the depth test and color buffer update (performed on each fragment)

In this figure, the yellow boxes correspond to the application programmable stages of the graphics pipeline. A programmer can define the behavior of these stages by writing shader programs in a graphics shading language like GLSL (in OpenGL) or HLSL (in Direct3D).

dvernet

So is a fragment basically an $\texttt{<r, g, b, a>}$ entry in the $\texttt{supersample_target}$ buffer from project 1 (or just in the render target if we only had 1 sample per pixel)?

kayvonf

@dvernet: Almost. A fragment is a shaded sample of the surface. This sample's value may be written into the render target if it passes the depth test and continues to reside in the render target if its not overwritten by a subsequent fragment. In short, many fragments may cover the same storage location in the render target.