92 Chapter 2 The Graphics System
are stored in the data structure
m_aafScanAttr. The inner loop follows next, where the
function
ClipToWindow converts clip-space coordinates to NDC values, and then to
window coordinates. The function
ApplyPixelShader is the entry point to actually
drawing the pixel, but involves additional logic related to depth buffering, stencil
buffering, alpha blending, and color masking. The details on the vertex and pixel
shader systems are found in Chapter 3.
2.6 Vertex Attributes
Triangles are drawn by the renderer as colored entities, the color of each pixel de-
termined by vertex attributes assigned to the vertices of the triangle. The pixels at
nonvertex locations are computed via interpolation by the rasterizer, the final