aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl')
-rw-r--r--linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl48
1 files changed, 0 insertions, 48 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl b/linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl
deleted file mode 100644
index b040143..0000000
--- a/linden/indra/newview/app_settings/shaders/class2/avatar/avatarV.glsl
+++ /dev/null
@@ -1,48 +0,0 @@
1vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec3 baseCol);
2mat4 getSkinnedTransform();
3void default_scatter(vec3 viewVec, vec3 lightDir);
4
5attribute vec4 materialColor;
6attribute vec4 binormal;
7
8void main()
9{
10 gl_TexCoord[0] = gl_MultiTexCoord0;
11
12 vec4 pos;
13 mat4 trans = getSkinnedTransform();
14 pos.x = dot(trans[0], gl_Vertex);
15 pos.y = dot(trans[1], gl_Vertex);
16 pos.z = dot(trans[2], gl_Vertex);
17 pos.w = 1.0;
18
19 vec3 norm;
20 norm.x = dot(trans[0].xyz, gl_Normal);
21 norm.y = dot(trans[1].xyz, gl_Normal);
22 norm.z = dot(trans[2].xyz, gl_Normal);
23 norm = normalize(norm);
24
25 vec3 binorm;
26 binorm.x = dot(trans[0].xyz, binormal.xyz);
27 binorm.y = dot(trans[1].xyz, binormal.xyz);
28 binorm.z = dot(trans[2].xyz, binormal.xyz);
29
30 float spec = 1.0-max(dot(reflect(normalize(pos.xyz), norm),gl_LightSource[0].position.xyz), 0.0);
31 spec *= spec;
32 spec = 1.0-spec;
33
34 vec4 color = calcLighting(pos.xyz, norm, materialColor, gl_Color.rgb);
35 gl_FrontColor = color;
36
37 gl_Position = gl_ProjectionMatrix * pos;
38
39 vec3 N = norm;
40 vec3 B = normalize(binorm);
41 vec3 T = cross(N,B);
42
43 //gl_TexCoord[1].xy = gl_MultiTexCoord0.xy + 1.0/512.0 * vec2(dot(T,gl_LightSource[0].position.xyz),
44 // dot(B,gl_LightSource[0].position.xyz));
45
46
47 default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
48} \ No newline at end of file