Vertex processing is a first graphics pipeline stage that can be programmed. Its main purpose is to convert positions of vertices, which form our geometry, from their local coordinate system into a coordinate system called a clip space. The clip coordinate system is used to allow graphics hardware to perform all following steps in a much easier and more optimal way. One of these steps is clipping, which clips processed vertices to only those that can be potentially visible, hence the name of the coordinate system. Apart from that, we can perform all the other operations, which are executed once per each vertex of drawn geometry.
Writing vertex shaders
How to do it...
- Create a text file. Select a name for the file, but use a vert extension for it (for example, shader...