Chapter 6. Compute Shaders
Up to this point, we have followed the rendering pipeline rules. Data was always sent in the form of vertex buffers or textures and was transformed accordingly with very well defined steps. Now we will learn about a new mechanism to use the GPU in a more flexible way with all the advantages of GLSL. This means that, as opposed to the other GPU solutions, we will have all the available OpenGL texture formats (not a restricted subset like in CUDA or OpenCL), vector and matrix types, and built-in functions.
Compute shaders is a quite extensive topic, with a lot of details that cannot be covered in a single chapter of any book. It is for that reason that in this chapter, we will cover only the basics, a brief introduction of the compute shaders' language, and the possibilities that they could bring to us.
In this chapter, we will learn how generic GPU processes are arranged into the processor and how they are executed. We will not only focus on rendering and image modifications...