Summary
In this chapter, we’ve discussed geometry shaders.
First, we talked about the base principles behind geometry shaders – we saw what they are, how they work, and also why they can be limited or risky to use. In particular, we focused on the case of Apple devices, which are now discontinuing the support for this kind of shader, thus requiring us to think twice before using them if we need full cross-platform compatibility.
We then studied a classical geometry shader application, which is rendering a wireframe version of our meshes. In just a few dozen lines, we were able to code a URP unlit shader script that highlights the geometry of our 3D models by drawing the edges of each triangle, which even works in-game, at runtime.
We are now nearing the end of this book, and we have seen a lot of examples that have taught us various tricks about modern Unity shaders and the new URP pipeline. To wrap all of this up, our next and final chapter will examine one...