Microsoft DirectX 9.0

Registers - vs_2_0

This section contains reference information for the input and output registers implemented by vertex shader version 2_0. 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 Register12floating-point4-D vectorwrite / read33nononeno
c#Constant Float Register256 (1)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 Register1integerscalaruse12nononeno


(1) 256 is the minimum c# register count required by vs_2_0. The D3DCAPS9.MaxVertexShaderConst cap contains the actual c# register count supported by the device.

Output Registers

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

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

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

© 2002 Microsoft Corporation. All rights reserved.