Chapter 3. Vertex Shaders
Vertex shaders are responsible for transforming the incoming geometry into something suitable to be rasterized, according to the rendering pipeline laws. In order to make this work, a vertex shader's inputs and outputs must be very well defined.
In this chapter we will see how the inputs must be prepared and how we can compute the outputs. Also, we will talk extensively about the operations we are allowed to perform.
A vertex shader executes once and only once for each vertex sent to the GPU. Inside a vertex shader, you have access to all information about that vertex, but you can't access the other sibling vertices of the primitive that is being processed.
It doesn't matter for the vertex shader which type of primitive ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access