Introduction
Shaders provide us with the ability to leverage the massively parallel architectures of today's modern graphics cards. Since they have the ability to transform the vertex positions, they can be used to implement aspects of animation directly within the shaders themselves. This can provide a certain bump in efficiency if the animation algorithm can be parallelized appropriately for execution within the shader.
One challenging aspect with respect to animation within shader programs is the difficulty of writing the updated positions. Shaders were not designed to write to arbitrary buffers (except of course the framebuffer). Therefore, many programmers make creative use of framebuffer objects (FBOs) and texture objects to store shader output.
Recently, however, OpenGL added a feature that enables us to write the values of the vertex shader's output variables to an arbitrary buffer (or buffers). This feature is called transform feedback .
In this chapter, we'll look at several examples...