Chapter 10. Compute Shaders

What You’ll Learn in This Chapter

• How to create, compile, and dispatch compute shaders

• How to pass data between compute shader invocations

• How to synchronize compute shaders and keep their work in order

Compute shaders are a way to take advantage of the enormous computational power of graphics processors that implement OpenGL. Just like all shaders in OpenGL, they are written in GLSL and run in large parallel groups that simultaneously work on huge amounts of data. In addition to the facilities available to other shaders such as texturing, storage buffers, and atomic memory operations, compute shaders are able to synchronize with each other and share data amongst themselves in order to make general computation ...

Get OpenGL® SuperBible: Comprehensive Tutorial and Reference, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.