aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/skinned_avatar_select.vp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/app_settings/skinned_avatar_select.vp
parentREADME.txt (diff)
downloadmeta-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.vp60
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
5PARAM mat[45] = { program.env[0..44] };
6PARAM proj[4] = { state.matrix.projection };
7PARAM materialDiffuse = state.material.diffuse;
8
9# Per vertex inputs
10ATTRIB iPos = vertex.position;
11ATTRIB iTex0 = vertex.texcoord[0];
12ATTRIB iWeight = vertex.attrib[1];
13
14# Temporaries
15TEMP blendMat;
16TEMP blendPos; # skinned vertex pos
17TEMP childPos;
18TEMP parentPos;
19TEMP dots; # dot product for lighting calculations
20TEMP scaledWeight;
21
22ALIAS divisor = blendMat; # divisor for normalization process
23
24ADDRESS address;
25
26# Outputs
27OUTPUT oPos = result.position; #position
28OUTPUT oCol0 = result.color; #primary color
29OUTPUT oTex0 = result.texcoord[0]; #texture coordinate set 0
30
31#fix input blending weight
32ARL address.x, iWeight.x;
33FRC scaledWeight.x, iWeight;
34
35#Output position and normal
36DP4 parentPos.x, mat[address.x + 0], iPos;
37DP4 parentPos.y, mat[address.x + 15], iPos;
38DP4 parentPos.z, mat[address.x + 30], iPos;
39
40DP4 childPos.x, mat[address.x + 1], iPos;
41DP4 childPos.y, mat[address.x + 16], iPos;
42DP4 childPos.z, mat[address.x + 31], iPos;
43
44SUB blendPos, childPos, parentPos;
45MAD blendPos, scaledWeight.x, blendPos, parentPos;
46MOV blendPos.w, {0, 0, 0, 1};
47
48#Projection
49DP4 oPos.x, proj[0], blendPos;
50DP4 oPos.y, proj[1], blendPos;
51DP4 oPos.z, proj[2], blendPos;
52DP4 oPos.w, proj[3], blendPos;
53
54#Output color
55MOV oCol0, materialDiffuse;
56
57#Output tex coordinate
58MOV oTex0, iTex0;
59
60END