diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/app_settings/skinned_avatar_select.vp | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/app_settings/skinned_avatar_select.vp')
-rw-r--r-- | linden/indra/newview/app_settings/skinned_avatar_select.vp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/skinned_avatar_select.vp b/linden/indra/newview/app_settings/skinned_avatar_select.vp new file mode 100644 index 0000000..28506b0 --- /dev/null +++ b/linden/indra/newview/app_settings/skinned_avatar_select.vp | |||
@@ -0,0 +1,60 @@ | |||
1 | !!ARBvp1.0 | ||
2 | # Vertex Program for lit, skinned avatars | ||
3 | |||
4 | # Parameters | ||
5 | PARAM mat[45] = { program.env[0..44] }; | ||
6 | PARAM proj[4] = { state.matrix.projection }; | ||
7 | PARAM materialDiffuse = state.material.diffuse; | ||
8 | |||
9 | # Per vertex inputs | ||
10 | ATTRIB iPos = vertex.position; | ||
11 | ATTRIB iTex0 = vertex.texcoord[0]; | ||
12 | ATTRIB iWeight = vertex.attrib[1]; | ||
13 | |||
14 | # Temporaries | ||
15 | TEMP blendMat; | ||
16 | TEMP blendPos; # skinned vertex pos | ||
17 | TEMP childPos; | ||
18 | TEMP parentPos; | ||
19 | TEMP dots; # dot product for lighting calculations | ||
20 | TEMP scaledWeight; | ||
21 | |||
22 | ALIAS divisor = blendMat; # divisor for normalization process | ||
23 | |||
24 | ADDRESS address; | ||
25 | |||
26 | # Outputs | ||
27 | OUTPUT oPos = result.position; #position | ||
28 | OUTPUT oCol0 = result.color; #primary color | ||
29 | OUTPUT oTex0 = result.texcoord[0]; #texture coordinate set 0 | ||
30 | |||
31 | #fix input blending weight | ||
32 | ARL address.x, iWeight.x; | ||
33 | FRC scaledWeight.x, iWeight; | ||
34 | |||
35 | #Output position and normal | ||
36 | DP4 parentPos.x, mat[address.x + 0], iPos; | ||
37 | DP4 parentPos.y, mat[address.x + 15], iPos; | ||
38 | DP4 parentPos.z, mat[address.x + 30], iPos; | ||
39 | |||
40 | DP4 childPos.x, mat[address.x + 1], iPos; | ||
41 | DP4 childPos.y, mat[address.x + 16], iPos; | ||
42 | DP4 childPos.z, mat[address.x + 31], iPos; | ||
43 | |||
44 | SUB blendPos, childPos, parentPos; | ||
45 | MAD blendPos, scaledWeight.x, blendPos, parentPos; | ||
46 | MOV blendPos.w, {0, 0, 0, 1}; | ||
47 | |||
48 | #Projection | ||
49 | DP4 oPos.x, proj[0], blendPos; | ||
50 | DP4 oPos.y, proj[1], blendPos; | ||
51 | DP4 oPos.z, proj[2], blendPos; | ||
52 | DP4 oPos.w, proj[3], blendPos; | ||
53 | |||
54 | #Output color | ||
55 | MOV oCol0, materialDiffuse; | ||
56 | |||
57 | #Output tex coordinate | ||
58 | MOV oTex0, iTex0; | ||
59 | |||
60 | END | ||