3 PARAM c4 = {4, 0, 20, 1};
4 PARAM mvp[4] = { state.matrix.mvp };
5 PARAM anim[] = { program.local[0..121] };
7 ATTRIB position = vertex.attrib[0];
8 ATTRIB normal = vertex.attrib[2];
9 ATTRIB color = vertex.attrib[3];
10 ATTRIB weights = vertex.attrib[6];
11 ATTRIB texcoord = vertex.attrib[8];
13 TEMP v, v2, v1, r0, r1, r2, t0, w;
16 #######################################################################
22 MUL r0, anim[a0.x+0], w.x;
23 MUL r1, anim[a0.x+1], w.x;
24 MUL r2, anim[a0.x+2], w.x;
25 SUB v1.xyz, position, anim[a0.x+3];
31 ##############################
34 MUL r0, anim[a0.x+0], w.y;
35 MUL r1, anim[a0.x+1], w.y;
36 MUL r2, anim[a0.x+2], w.y;
37 SUB v1.xyz, position, anim[a0.x+3];
43 MAD v.xyz, anim[a0.x+3].w, v2, v;
45 ##############################
48 MUL r0, anim[a0.x+0], w.z;
49 MUL r1, anim[a0.x+1], w.z;
50 MUL r2, anim[a0.x+2], w.z;
51 SUB v1.xyz, position, anim[a0.x+3];
57 MAD v.xyz, anim[a0.x+3].w, v2, v;
60 ######################################################################
62 DP4 result.position.x, mvp[0], v;
63 DP4 result.position.y, mvp[1], v;
64 DP4 result.position.z, mvp[2], v;
65 DP4 result.position.w, mvp[3], v;
67 MOV result.color, color;
68 MOV result.texcoord, texcoord;