Graphics Reference
In-Depth Information
It is critical for performance that the amount of data sent into and out of the geometry
shader is kept to a minimum. The geometry shader stage has the potential to slow down
the rendering performance quite significantly.
Uses of the geometry shader might include rendering multiple faces of environment maps
in a single pass (refer to Chapter 9 , Rendering on Multiple Threads and Deferred Contexts ),
and point sprites/billboarding (commonly used in particle systems). Prior to Direct3D 11,
the geometry shader could be used to implement tessellation.
Device context commands that control the geometry shader stages are grouped in the
GeometryShader property, or for unmanaged begin with GS.
Stream Output (SO) stage
The stream output stage is an optional fixed function stage that is used to output geometry
from the geometry shader into vertex buffers for re-use or further processing in another pass
through the pipeline.
There are only two commands on the device context that control the stream output stage
found on the StreamOutput property of the device content: GetTargets and SetTargets
(unmanaged SOGetTargets and SOSetTargets ).
Rasterizer stage (RS)
The rasterizer stage is a fixed function stage that converts the vector graphics (points,
lines, and triangles) into raster graphics (pixels). This stage performs view frustum clipping,
back-face culling, early depth/stencil tests, perspective divide (to convert our vertices from
clip-space coordinates to normalized device coordinates), and maps vertices to the viewport.
If a pixel shader is specified, this will be called by the rasterizer for each pixel, with the result
of interpolating per-vertex values across each primitive passed as the pixel shader input.
There are additional interpolation modifiers that can be applied to the pixel shader input
structure that tell the rasterizer stage the method of interpolation that should be used for
each property (for more information see Interpolation Modifiers introduced in Shader Model
4 on MSDN at http://msdn.microsoft.com/en-us/library/windows/desktop/
bb509668(v=vs.85).aspx#Remarks ).
When using multisampling, the rasterizer stage can provide an additional coverage mask
to the pixel shader that indicates which samples are covered by the pixel. This is provided
within the SV_Coverage system-value input semantic. If the pixel shader specifies the SV_
SampleIndex input semantic, instead of being called once per pixel by the rasterizer, it will
be called once per sample per pixel (that is, a 4xMSAA render target would result in four calls
to the pixel shader for each pixel).
Device context commands that control the rasterizer stage state are grouped in the
Rasterizer property of the device context or for unmanaged begin with RS.
 
Search WWH ::




Custom Search