Summary
In this chapter, we have learnt the basic concepts of compute shaders. As said, they are a complex topic, mainly because of the manual synchronization that must be done to ensure correct results and high performance. We only saw a humble mechanism for that: the glMemoryBarrier function which blocks execution until certain operations have finished, but there are many others, even inside the shaders (atomic operations and counters, control barriers, and so on).
It's up to you to discover more about compute shader features such as shared memory access for the work items inside a work group or how to use buffers with complex data structures in conjunction with images to create amazing shaders. You can also learn how to perform pure mathematical ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access