Game Development Reference
In-Depth Information
Chapter 5. Rendering
Simple
3D
Graphics
Now that we've covered user input, 2D graphics, and sound, let's take a look at 3D
graphics. Most games these days are 3D, probably because 3D graphics are cooler
than 2D graphics! That's not to say that 2D graphics are bad or outdated. There are
still many games made using 2D graphics, but creating a game in 3D literally adds
another dimension to the game, giving the world that much more depth and making it
more interesting to explore.
In this chapter we will cover the following topics:
• The Direct3D graphics rendering pipeline
• Shaders
• Rendering a triangle
• Rendering a cube with texturing
The
Direct3D
graphics
rendering
pipeline
The Direct3D graphics rendering pipeline takes our geometry data and turns it into
graphics on the screen. It is designed to generate graphics for real-time applications
such as video games. The pipeline consists of a number of stages that our data goes
through to produce the finished image for the current frame. Some of these stages
are programmable, giving us a lot more power. Let's take a look at the main pipeline
stages, which are:
• Input assembler
• Vertex shader
• Rasterizer
• Pixel shader
• Output merger
Search WWH ::




Custom Search