Microsoft DirectX 8.0 (Visual Basic) |
These are the constant registers. There are at least 96 four-component floating-point vectors comprising the constant register file. The constant registers are designated as either absolute or relative.
c[n] ; absolute c[a0.x + n] ; relative - supported only in version 1.1
Therefore, the constant register may be read by using an absolute address, or addressed relative to an address register. Reads from out-of-range registers return (0.0, 0.0, 0.0, 0.0).
The constant register file is read-only from the perspective of the vertex shader. Any single instruction may access only one constant register. However, each source in that instruction may independently swizzle and negate that vector as it is read.
The MaxVertexShaderConst member of D3DCAPS8 indicates the number of available constant registers. Microsoft® DirectX® 8.0 shaders support at least 96 constants.
The constant register file has its data loaded by calling the Microsoft Direct3D® API function to set the vertex shader constant register. Alternatively, when creating a shader, the user can specify what constants should be loaded for a Visual Basic application by an Direct3DDevice8.SetVertexShader call.