Registers - vs_3_0
Microsoft DirectX 9.0 SDK Update (October 2004)

Registers - vs_3_0


This section contains reference information for the input and output registers implemented by vertex shader version 3_0.

Input Registers

RegisterNameCountR/W# Read ports# Reads / instDimensionRelAddrDefaultsRequires DCL
v#Input Register16R1Unlimited4NoSee note 1Yes
r#Temporary Register32R/W3Unlimited4NoNoneNo
c#Constant Float RegisterSee note 2R1Unlimited4a0 / aL(0, 0, 0, 0)No
a0Address Register1R/W1Unlimited4NoNoneNo
b#Constant Boolean Register16R111NoFALSENo
i#Constant Integer Register16R114No(0, 0, 0, 0)No
aLLoop Counter Register1R1Unlimited1NoNoneNo
p0Predicate Register1R/W114nononeno
s#Sampler4R114NoSee note 3Yes

Notes:

  1. Partial (0, 0, 0, 1) - If only a subset of channels are updated, the remaining channels will default to (0, 0, 0, 1).
  2. Equal to D3DCAPS9.MaxVertexShaderConst (at least 256 for vs_3_0).
  3. Defaults for sampler lookup exist, but values depend on texture format.

Output Registers

Output registers have been collapsed into 12 o# (output) registers. These can be used for anything the user wants to interpolate for the pixel shader: texture coordinates, colors, fog, etc.

RegisterNameCountR/WDimensionRelAddrDefaultsRequires DCL
o#Output Register12W4aLNoneYes


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.