Game Development Reference
In-Depth Information
Geometry shaders were introduced in Direct3D 10.0, and provide a way to generate
geometry completely on the GPU. These allow for some interesting tricks; however,
they're also well outside the scope of this topic, so we'll skip over them for now. The
hull, domain, and geometry shaders are optional features that are not available on
pre-Direct3D 10.0 hardware.
Once we have processed the vertices, they are sent to the rasterizer , which is re-
sponsible for interpolating across the screen and finding the region of pixels that rep-
resent the object. This happens automatically and results in the input to the pixel
shader .
The pixel shader is where the final color of the pixel is determined. Here, we can ap-
ply lighting effects to generate the photorealistic scenes we see in modern games, or
anything else that we want. In the pixel shader stage, the developer has full control
over the final look, which can result in some crazy visual effects, as evident in the
many demoscene projects that are created each year.
Note
The demoscene is a collection of developers who create visual experiences, of-
ten set to music, and in incredibly small executables. It's easy to find demo chal-
lenges that require a maximum executable size of 64k or even 4k.
Finally, we will end up with a lot of pixels, some even trying to share the same spot on
the texture. This is where the Output Merger combines everything down into a flat
2D texture that can be displayed on the screen. The Output Merger handles resolv-
ing the pixels down to a single color and writing them out to our render target and
depth buffer.
Search WWH ::




Custom Search