Shader Registers

Shader Register List

Input Registers (12 registers)
Default NameDefault RegisterUsageNumberDescription
aPosition.xyz v0 Position 1 Position information of vertex
aNormal.xyz v1 Normal 1 Normal vector information of vertex
aTangent.xyz v2 Tangent 1 Tangent vector information of vertex
aColor v3 Color 1 Color information of vertex (w is used together with the hemispherical light alpha)
aTexCoord0.xy v4 TexCoord0 1 Texture coordinate information of vertex
aTexCoord1.xy v5 TexCoord1 1 Texture coordinate information of vertex
aTexCoord2.xy v6 TexCoord2 1 Texture coordinate information of vertex
aBoneIndex v7 BoneIndex 1 Bone index number information of vertex
aBoneWeight v8 BoneWeight 1 Vertex bone weight information
aUserAttribute? v9-v11 UserAttribute? 0~12 User attribute information of vertex
Constant Registers (96 registers)
NameRegistersNumberDescription
WrldMtx c0 3 World matrix
NormMtx c3 3 Normal matrix
PosOffs c6 1 Position offset for input registers
IrScale c7 2 Scale for input register
m00: Position, m01: Normal, m02: Tangent, m03: Color
m10: TexCoord0, m11: TexCoord1, m12: TexCoord2, m13: BoneWeight
- c8 1 Reserved
Tex.xyz c10 1 Texture coordinate allocation
UvCoordinateMap(0.0-2.0), CameraSphereEnvMap(0.0), CameraCubeEnvMap(4.0), ProjectionMap(0.0)
x,y,z: Texture0, Texture1, Texture2
Values 0 through 2 represent texture assignments, while 3 and 4 represent Cube and SphereMap, respectively.
TexMtx0 c11 3 Texture coordinate matrix 0
TexMtx1 c14 3 Texture coordinate matrix 1
TexMtx2 c17 2 Texture coordinate matrix 2
TexTran c19 1 Texture translation (uses Tex0 and Tex1 projection maps)
MatAmbi c20 1 Material ambient color (w = VertexColorScale)
MatDiff c21 1 Material diffuse color
HslGCol c22 1 Ground color for hemispherical lighting
HslSCol c23 1 Space color for hemispherical lighting
HslSDir c24 1 Directional vector toward space for hemispherical lighting (w = LerpFactor)
UnivReg c25 60 Universal register (Mutable. Set first half for matrix palette, second half for lights)
bn = number of bones
ln = number of vertex lights
3 x bn Position matrix
1 x ln Light ambient color
1 x ln Light diffuse color
1 x ln Light position (w = IsDirectionalLight)
1 x ln Spotlight direction (w = IsSpotLightEnabled)
1 x ln Light distance attenuation parameters (x = K0, y = K1, z = K2, w = IsAttenuationDistanceEnabled)
1 x ln Light spot parameters (x = SpotExponent, y = SpotCutoffAngle)
- c85 1 Empty
ProjMtx c86 4 Projection matrix
ViewMtx c90 3 View matrix.
- c93 3 Constant value
Boolean Registers (16 registers)
NameRegistersNumberDescription
b0 1 Reserved by DMP
IsSmoSk b1 1 Skinning ON/OFF
IsRgdSk b2 1 Rigid skinning ON/OFF
- b3 1 Empty
- b4 1 Empty
IsHemiL b5 1 Hemispherical light ON/OFF
IsHemiO b6 1 Hemispherical light occlusion ON/OFF
IsVertA b7 1 Vertex color alpha ON/OFF
IsBoneW b8 1 Bone weight ON/OFF
UvMap0 b9 1 UV mapping ON/OFF
UvMap1 b10 1 UV mapping ON/OFF
UvMap2 b11 1 UV mapping 2 ON/OFF
IsVertL b12 1 Vertex lighting ON/OFF
IsTex1 b13 1 Texture ON/OFF
IsTex2 b14 1 Texture 2 ON/OFF
IsQuate b15 1 Quaternion calculation ON/OFF
Integer Registers (4 registers)
NameRegistersNumberDescription
LightCt i0 1 Number of vertex lights (loop counter)
i1 1 Empty
i2 1 Empty
i3 1 Empty

Universal Register Assignments


CONFIDENTIAL