Chapter 10. Geometry Shaders

Chapter Objectives

After reading this chapter, you’ll be able to do the following:

• Create and use geometry shaders to further process geometry within the OpenGL pipeline.

• Create additional geometric primitives using a geometry shader.

• Use geometry shaders in combination with transform feedback to generate multiple streams of geometric data.

• Render to multiple viewports in a single rendering pass.

In this chapter, we introduce an entirely new shader stage—the geometry shader. The geometry shader sits logically right before primitive assembly and fragment shading. It receives as its input complete primitives as a collection of vertices, and these inputs are represented as arrays. Typically, the inputs are provided ...

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition 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.