Export (0) Print
Expand All

Address Register

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 versions1_12_02_sw2_x3_03_sw
Address Registerxxxxxx

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft