Generating Output-Patch Vertices

Tessellation control shaders use the vertices specified by the application, which we’ll call input-patch vertexs, to generate a new set of vertices, the output-patch vertices, which are stored in the gl_out array of the tessellation control shader. At this point, you might be asking what’s going on; why not just pass in the original set of vertices from the application, and skip all this work? Tessellation control shaders can modify the values passed from the application, but can also create or remove vertices from the input-patch vertices when producing the output-patch vertices. You might use this functionality when working with sprites, or when minimizing the amount of data sent from the application to OpenGL, ...

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.