Summary
In this chapter, you explored how to optimize an animation system for several scenarios. These optimizations reduce the number of uniforms that a vertex skinning shader requires, speeding up the sampling of animations with many keyframes and generating the matrix palette of a pose faster.
Keep in mind that there is no one-size-fits-all solution. If all the animations in a game have a few keyframes, the added overhead of optimizing animation sampling with a lookup table might not be worth the additional memory. However, changing the sampling function to use a binary search might be worth it. Similar pros and cons exist for each optimization strategy; you must pick what makes sense for your particular use case.
When looking at the sample code for this chapter, Chapter11/Sample00
contains the code for this chapter in its entirety. Chapter11/Sample01
shows how to use pre-skinned meshes, Chapter11/Sample02
shows how to use the FastTrack
class for faster sampling, and Chapter11...