?/TD>
Microsoft DirectX 9.0

Relative Addressing


The [ ] syntax can be used only in register types that can be relatively addressed in certain shader models. The supported forms of [ ] syntax are listed as follows:

Where:

[ ] syntaxEffective indexExamples
R[ A + m0 + ... + mj ]A + m0 + ... + mjc[ a0.x + 3 + 7 ]
R[ k ] ( = Rk )kc[ 10 ] ( = c10 )
R[ A ]Ac[ a0.y ]
Rk[ n0 + ... + ni + A + m0 + ... + mj ]A + k + n0 + ... + ni + m0 + ... + mjc8[ 3 + 2 + a0.w + 5 + 6 + 1 ]
R[ n0 + ... + ni + A + m0 + ... + mj ]A + n0 + ... + ni + m0 + ... + mjc[ 2 + 1 + aL + 3 + 4 + 5 ]
Rk[ A ]A + kc12[ aL ], c0[ a0.z ]
Rk[ A + m0 + ... + mj ]A + k + m0 + ... + mjv1[ aL + 4 + 8 ]
R[ n0 + ... + ni + A ]A + n0 + ... + nio[ 3 + 1 + aL ]
Rk[ n0 + ... + ni + A ]A + k + n0 + ... + nio1[ 2 + 1 + 3 + aL ]

The registers are available in the following versions:

Register typeShader versions
a0vs_1_1 and higher
aLvs_2_0 and higher, ps_3_0
cnvs_1_1 and higher, ps_3_0
onvs_3_0


© 2002 Microsoft Corporation. All rights reserved.