ABSTRACT

Our first sample chapter will cover the fairly broad topic of mesh rendering. As we have seen in Chapter 3, there are many different ways to submit work for the GPU to perform. To introduce the beginner to a basic example of how this can be achieved, we begin with a discussion of transformation matrices and how they are used in the context of the rendering pipeline to achieve basic mesh placement within a scene. After the basics of animating an object have been covered, we extend the simple transformation matrices to allow for animation to take place within the mesh itself. A technique for vertex skinning is presented, which allows a number of transformation matrices to be used to deform the basic shape of a model for more flexibility in how a mesh can be manipulated. Finally, we discuss adding displacement mapping to our vertex skinning sample. Displacement mapping allows the higher-frequency details of a model to be stored in a texture instead of within the mesh itself, potentially allowing for improvements on the standard vertex skinning technique.