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 ...

Get GLSL Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.