/
skin.vp
59 lines (43 loc) · 1.22 KB
/
skin.vp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
!!ARBvp1.0
PARAM c4 = {4, 0, 0, 1};
PARAM mvp[4] = { state.matrix.mvp };
PARAM anim[] = { program.local[0..121] };
ATTRIB position = vertex.attrib[0];
ATTRIB normal = vertex.attrib[2];
ATTRIB color = vertex.attrib[3];
ATTRIB weights = vertex.attrib[6];
ATTRIB texcoord = vertex.attrib[8];
TEMP v, t, w, s;
ADDRESS a0;
#######################################################################
FRC w, weights;
ARL a0.x, weights.x;
DPH v.x, position, anim[a0.x+0];
DPH v.y, position, anim[a0.x+1];
DPH v.z, position, anim[a0.x+2];
MUL v, v, w.x;
##############################
ARL a0.x, weights.y;
DPH t.x, position, anim[a0.x+0];
DPH t.y, position, anim[a0.x+1];
DPH t.z, position, anim[a0.x+2];
MAD v.xyz, t, w.y, v;
##############################
ARL a0.x, weights.z;
DPH t.x, position, anim[a0.x+0];
DPH t.y, position, anim[a0.x+1];
DPH t.z, position, anim[a0.x+2];
MAD v.xyz, t, w.z, v;
MOV v.w, c4.w;
######################################################################
#MOV v, position;
DP4 result.position.x, mvp[0], v;
DP4 result.position.y, mvp[1], v;
DP4 result.position.z, mvp[2], v;
DP4 result.position.w, mvp[3], v;
MOV result.color, color;
MOV result.texcoord, texcoord;
END
# Local Variables:
# mode: python
# End: