Here is an example from exercise 2.
This table lists all the possible data formats for each data type.
VECTOR |
float
float, float
float, float, float
float, float, float, float
|
4.5f
4.5f, 1.0f
4.5f, 1.0f, 2.0f
4.5f, 1.0f, 2.0f, 3.4f
|
MATRIX |
float, float, float, float,
float, float, float, float,
float, float, float, float,
float, float, float, float
|
1.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
|
VERTEXSHADER |
DECL { ... } DECL { ... }, ASM { ... } |
decl
{
stream 0;
float v0[3];
float v3[3];
ubyte v5[4];
float v7[2];
}
decl
{
stream 1;
float v1[1];
float v2[2];
ubyte v6[3];
float v8[4];
}
asm
{
ps.1.0
tex t0
mov r0, t0
}
|