Make FPU version run fast
[dormin.git] / skin.vp
blobfb8c686f511d2fc619795b19b88463de90e78355
1 !!ARBvp1.0
3 PARAM c4 = {4, 0, 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 MAD v.xyz, t, w.y, v;
35 ##############################
36 ARL a0.x, weights.z;
38 DPH t.x, position, anim[a0.x+0];
39 DPH t.y, position, anim[a0.x+1];
40 DPH t.z, position, anim[a0.x+2];
42 MAD v.xyz, t, w.z, v;
44 MOV v.w, c4.w;
45 ######################################################################
46 #MOV v, position;
47 DP4 result.position.x, mvp[0], v;
48 DP4 result.position.y, mvp[1], v;
49 DP4 result.position.z, mvp[2], v;
50 DP4 result.position.w, mvp[3], v;
52 MOV result.color, color;
53 MOV result.texcoord, texcoord;
55 END
57 # Local Variables:
58 # mode: python
59 # End: