Preparing the vertex shader and buffers for vertex skinning

In this recipe, we will update our vertex structure, constant buffers, and vertex shader to support the transforming of vertices based on an underlying bone structure.

The key component of vertex skinning or skinning is the hierarchy of pose and movement that is produced by a bone structure or skeleton within a mesh (also known as an armature). As we know from basic anatomy, a skeleton provides, among other functions, a mechanism for transmitting muscular forces. It is a collection of bones, each connected to another.

We apply the same concept to the armature of a mesh. We have a root bone, and each subsequent bone is parented by the root bone or another bone that ultimately resolves it's ...

Get Direct3D Rendering Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.