Game Development Reference
In-Depth Information
Input assembler
The main purpose of the input assembler is to take our raw vertex data (points,
lines, or triangles), and assemble them into primitives, such as Primit-
iveType.TriangleList , which can be used by the graphics rendering pipeline.
This primitive type tells Direct3D that our vertex data is arranged so that every three
vertices in the list make a single triangle. All of the primitive types supported by Dir-
ect3D are defined in the PrimitiveType enumeration.
Vertex shader
The vertex shader stage performs per-vertex operations on vertex data outputted
from the input assembler stage. These operations are things such as transforma-
tions, per-vertex lighting, morphing, and skinning.
Rasterizer
The rasterizer stage takes the primitives processed in the previous stages and turns
them into pixels to make a rendered image. It also performs the clipping of vertices,
which means that if part of a triangle is off the screen, it will clip that part of the tri-
angle off, so to speak, since it doesn't need to be drawn.
Pixel shader
The pixel shader stage of the graphics pipeline performs shading techniques, such
as per-pixel lighting or post-processing stuff. The rasterizer invokes the pixel shader
stage once for each pixel, which is covered by the current primitive that it is process-
ing.
Output merger
The output merger generates the final pixel color using a combination of numerous
things, including the current state of the graphics pipeline, the data generated by
the pixel shader stage, and the contents of render targets, and depth/stencil buffers,
which we'll get into a bit later in the chapter.
Search WWH ::




Custom Search