Microsoft DirectX 9.0

Registers - vs_2_x

This section contains reference information for the input and output registers implemented by vertex shader version 2_x. Vector elements are designated as x, y, z, w (or the r, g, b, a equivalents).

Input Registers

NameRegister typeCountData typeDimensionI/O permissionsRead portRead / InstructionRel-AddressDefaultsRequires DCL
v#Input Register16floating-point4-D vectorread13noPartial(0001)yes
r#Temporary Register12 (1)floating-point4-D vectorread / write33nononeno
c#Constant Float Register256 (2)floating-point4-D vectordefine / read12a0 / aL(0, 0, 0, 0)no
i#Constant Integer Register16integer4-D vectordefine / use11no(0, 0, 0, 0)no
b#Constant Boolean Register16booleanscalardefine / use11noFALSEno
a0Address Register1integer4-D vectorwrite / use12nononeno
aLLoop Counter Register1integerscalaruse12 nononeno
p0Predicate1boolean4-D vectorwrite / use11nononeno


(1) - 12 is the minimum r# register counted required by vs_2_x. The D3DCAPS9.VS20Caps.NumTemps cap contains the actual r# register count supported by the device. See D3DCAPS9.

(2) - 256 is the minimum c# register count required by vs_2_x. The MaxVertexShaderConst cap contains the actual c# register count supported by the device. See D3DCAPS9.

Output Registers

NameRegister typeCountData typeDimensionI/O permissionsRel-AddressDefaultRequire DCL
oD#Diffuse/Specular Register2 (3)floating-point4-D vectorwritenononeno
oFogFog Register1floating-pointscalarwritenononeno
oPos (4)Position Register1floating-point4-D vectorwritenononeno
oPtsPoint Size Register1floating-pointscalarwritenononeno
oT#Texture Coordinates Register8floating-point4-D vectorwritenononeno

(3) oD0 = diffuse color; oD1 = specular color.

(4) All four components of oPos must be written.

© 2002 Microsoft Corporation. All rights reserved.