A programmable vertex shader is made up of a set of instructions that operate on vertex data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
- Instructions - vs_2_0 contains a list of the available instructions.
- Registers - vs_2_0 lists the different types of registers used by the vertex shader ALU.
- Vertex Shader Register Modifiers are used to modify the way an instruction works.
- Vertex Shader Source Register Modifiers alter the source register data before the instruction runs.
- Source Register Swizzling gives additional control over which register components are read, copied, or written.
- Destination Register Masking determines what components of the destination register get written.
Each vertex shader can have up to 256 instructions stored. The number of instructions run can be much higher (because of the loop/rep support), and is capped by D3DCAPS9.MaxVShaderInstructionsExecuted, which should be at least 0xFFFF.