Simplify
[dormin.git] / skin.vp
blob385c8eef18c991607c2ce1dfff89026ab3f558d9
1 !!ARBvp1.0
3 PARAM c4 = {4, 1e-8, 0, 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, t, w, s;
14 ADDRESS a0;
16 #######################################################################
17 FRC w, weights;
19 ARL a0.x, weights.x;
21 DPH v.x, position, anim[a0.x+0];
22 DPH v.y, position, anim[a0.x+1];
23 DPH v.z, position, anim[a0.x+2];
24 MUL v, v, w.x;
26 ##############################
27 ARL a0.x, weights.y;
29 DPH t.x, position, anim[a0.x+0];
30 DPH t.y, position, anim[a0.x+1];
31 DPH t.z, position, anim[a0.x+2];
33 SGE s, w.y, c4.y;
34 MUL s, s, w.y;
35 MAD v.xyz, t, s, v;
37 ##############################
38 ARL a0.x, weights.z;
40 DPH t.x, position, anim[a0.x+0];
41 DPH t.y, position, anim[a0.x+1];
42 DPH t.z, position, anim[a0.x+2];
44 SGE s, w.z, c4.y;
45 MUL s, s, w.z;
46 MAD v.xyz, t, s, v;
48 MOV v.w, c4.w;
49 ######################################################################
50 #MOV v, position;
51 DP4 result.position.x, mvp[0], v;
52 DP4 result.position.y, mvp[1], v;
53 DP4 result.position.z, mvp[2], v;
54 DP4 result.position.w, mvp[3], v;
56 MOV result.color, color;
57 MOV result.texcoord, texcoord;
59 END
61 # Local Variables:
62 # mode: python
63 # End: