January 2003
Intermediate to advanced
424 pages
8h 1m
English
A vertex shader is made up of a set of instructions that operate on data for a single vertex. The shader is executed once for each vertex in a render primitive. A vertex shader will have one vertex input provided to it and will be expected to have one vertex output.
A vertex shader must do at least one thing: place the vertex’s position in clip-space coordinates in the output position register. That is, the vertex position must be transformed by the current model/world/view transformation matrix. Now if your world, model, and projection matrix were identity, then you could just pass in the value that is fed to the shader, but usually you’d be getting the vertex position in world coordinates, and ...
Read now
Unlock full access