Summary
In this chapter, you learned how to encode animation data to textures, as well as how to interpret the data in a vertex shader. Several strategies for improving performance by changing how the animation data is encoded were also covered. This technique of writing data into a texture can be used to bake any kind of sampled data.
To bake an animation, you need to clip out into a texture. This clip was sampled at set intervals. The global position of every bone was recorded at each interval and written to a texture. In this animation texture, every joint takes up three rows: one for position, one for rotation, and one for scale.
You rendered the crowd mesh using instancing and created a shader that can read per-instance data from uniform arrays. Per instance-data for actors of the crowd, such as position, rotation, and scale, were passed to the shader as uniform arrays and interpreted using the instance ID as an index into those arrays.
Finally, you created the Crowd
...