- Create a text file. Select a name for the file and use a geom extension for it (for example, shader.geom).
- Insert #version 450 in the first line of the file.
- Using the in layout qualifier, define the type of primitives that are drawn in an application: points, lines, lines_adjacency, triangles, or triangles_adjacency:
layout( <primitive type> ) in;
- Using the out layout qualifier, define the type of primitives that are formed (output) by the geometry shader (points, line_strip or triangle_strip), and the maximal number of vertices that the shader may generate:
layout( <primitive type>, max_vertices = <count> ) out;
- Define a set of input array variables that are provided from a vertex or tessellation evaluation stage. ...