?/TD>
Microsoft DirectX 9.0

Vertex Shader 3_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

New features include the following:

Indexing Registers

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).

Vertex Textures

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.

Vertex Stream Frequency

This feature allows a subset of the input registers to be initialized at a rate different from once per vertex. See Vertex Stream Frequency.

Shader Output

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

Dynamic flow control instructions are supported. The depth values allowed is a maximum of 24.

Static Flow Control Nesting Depth

Static flow control instructions are supported. The depth value allowed is a maximum of 4.

Instruction Count

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.



© 2002 Microsoft Corporation. All rights reserved.