|Microsoft DirectX 9.0|
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.
New features include the following:
In the earlier shader models, only the constant register bank could be indexed. In this model, the following register banks can be indexed, using the loop counter register (aL).
This shader model supports texture lookup in the vertex shader using texldl. The vertex engine has four texture sampler stages (distinct from the displacement map sampler and the texture samplers in the pixel engine) that can be used to sample textures set at those stages. See Vertex Textures.
This feature allows a subset of the input registers to be initialized at a rate different from once per vertex. See Vertex Stream Frequency.
Similar to vs_2_0, the output of the shader can vary with static flow control. Be careful with dynamic branching as this can cause shader outputs to vary per vertex. This will produce unpredictable results on different hardware.
Dynamic flow control instructions are supported. The depth values allowed is a maximum of 24.
Static flow control instructions are supported. The depth value allowed is a maximum of 4.
Each vertex shader is allowed anywhere from 512 up to the number of slots in the MaxVertexShader30InstructionSlots member of D3DCAPS9. The number of instructions run can be much higher because of the looping support. The MaxVShaderInstructionsExecuted cap in D3DCAPS9 should be at least 2^16.