Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The a0 register is an address register. A single register is available in version vs_1_1. The address register, designated as a0.x in vs_1_1, can be used as a signed integer offset for relative addressing into the constant register file. For versions vs_2_0 and above, all four components (.x, .y, .z, .w) are available for relative addressing.
c[a0.x + n]
The address register cannot be read by a vertex shader, it can only be used for relative addressing of a constant register. Reading values outside of the legal range will return (0.0, 0.0, 0.0, 0.0). The address register can only be a destination for the mov - vs instruction. If a floating-point number is moved into an integer register, a round-to-nearest conversion happens.
All shaders must initialize the address register before using it. For version vs_2_0 and above, the mova - vs instruction can move a floating-point value to an address register.
Vertex shader versions | 1_1 | 2_0 | 2_sw | 2_x | 3_0 | 3_sw |
---|---|---|---|---|---|---|
Address Register | x | x | x | x | x | x |
Related topics