Graphics Reference
In-Depth Information
the vertex shader. Chapter 8, “Vertex Shaders,” describes how to transform
the vertex position from object to clip coordinates and how to load
appropriate matrices in the vertex shader to perform this transformation.
Clipping
To avoid processing of primitives outside the viewable volume, primitives
are clipped to the clip space. The vertex position after the vertex shader
has been executed is in the clip coordinate space. The clip coordinate is
a homogeneous coordinate given by ( x c , y c , z c , w c ) . The vertex coordinates
defined in clip space ( x c , y c , z c , w c ) get clipped against the viewing volume
(also known as the clip volume).
The clip volume, as shown in Figure 7-8, is defined by six clipping planes,
referred to as the near, and far clip planes, the left and right clip planes,
and the top and bottom clip planes. In clip coordinates, the clip volume is
given as follows:
-w c <= x c <= w c
-w c <= y c <= w c
-w c <= z c <= w c
The preceding six checks help determine the list of planes against which
the primitive needs to be clipped.
y
x
Near
Plane
Far
Plane
Figure 7-8
Viewing Volume
 
 
Search WWH ::




Custom Search