diff options
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl')
-rwxr-xr-x | linden/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/linden/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl new file mode 100755 index 0000000..0d52f32 --- /dev/null +++ b/linden/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl | |||
@@ -0,0 +1,31 @@ | |||
1 | /** | ||
2 | * @file shinyV.glsl | ||
3 | * | ||
4 | * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. | ||
5 | * $License$ | ||
6 | */ | ||
7 | |||
8 | vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); | ||
9 | |||
10 | void calcAtmospherics(vec3 inPositionEye); | ||
11 | |||
12 | uniform vec4 origin; | ||
13 | |||
14 | void main() | ||
15 | { | ||
16 | //transform vertex | ||
17 | gl_Position = ftransform(); | ||
18 | |||
19 | vec4 pos = (gl_ModelViewMatrix * gl_Vertex); | ||
20 | vec3 norm = normalize(gl_NormalMatrix * gl_Normal); | ||
21 | vec3 ref = reflect(pos.xyz, -norm); | ||
22 | |||
23 | gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; | ||
24 | gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0); | ||
25 | |||
26 | calcAtmospherics(pos.xyz); | ||
27 | |||
28 | gl_FrontColor = calcLighting(pos.xyz, norm, gl_Color, vec4(0.0)); | ||
29 | |||
30 | gl_FogFragCoord = pos.z; | ||
31 | } | ||