Register Assignments

Universal Register Assignments

UnivRegister.png(9735 byte)

Shader Register List

Input Registers (12 registers)
NameRegistersNumberDescription
aPosition.xyz - 1 Position information of vertex
aNormal.xyz - 1 Normal vector information of vertex
aTangent.xyz - 1 Tangent vector information of vertex
aColor - 1 Color information of vertex (w is used together with the hemispherical light alpha)
aTexCoord0.xy - 1 Texture coordinate information of vertex
aTexCoord1.xy - 1 Texture coordinate information of vertex
aTexCoord2.xy - 1 Texture coordinate information of vertex
aBoneIndex - 1 Bone index number information of vertex
aBoneWeight - 1 Vertex bone weight information
aUserAttribute? - 1 ~ 8 User attribute information of vertex
<Needs Study> - ? Vertex morphing delta attribute information
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 3 Scale for input register
m00: Position , m01: Normal , m02: Tangent , m03: Color
m10: TexCoord0, m11: TexCoord1 , m12: TexCoord2 , m13: BoneWeight
m20: BoneIndex (always 1.0f), m21: Empty, m22: MatrixPalletCount, m23: InverseScale
TexcMap.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 3 Texture coordinate matrix 2
TexTran c19 1 Texture translation (uses Tex0 and Tex1 sphere 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 (matrix palette, light settings)
bn = number of bones
ln = number of vertex lights
3 x bn Position matrix
3 x bn Normal 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 Reserved
ProjMtx c86 4 Projection matrix
ViewMtx c90 3 (Model) 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
IsUniSc b3 1 Even scale ON/OFF
UseNorM b4 1 Use normal matrix ON/OFF
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 0 ON/OFF
UvMap1 b10 1 UV mapping 1 ON/OFF
UvMap2 b11 1 UV mapping 2 ON/OFF
IsVertL b12 1 Vertex light ON/OFF
IsTex1 b13 1 Texture 1 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 Reserved
i2 1 Reserved
i3 1 Reserved

CONFIDENTIAL