Wireframes and Geometry Shaders
In the two previous chapters, we studied various examples of shaders and focused on two specific types – 2D sprite effects and vertex displacement-based effects. When we worked on the vertex displacement technique, we saw that it was a neat way of creating procedural animations and environment decor efficiently, just by deforming the pre-existing geometry.
However, we also saw that there was a limitation to using vertex displacement, since it can only modify the vertices already present in the mesh – it cannot introduce new points or subdivisions, and it doesn’t have access to the mesh’s topology.
To go further and allow technical artists to manipulate geometry even more, there is another category of shaders worth diving into, called geometry shaders. So, in this chapter, we’ll learn more about this other tool, as well as its limitations, and we’ll discuss one of its most common applications. To do so,...