aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl')
-rw-r--r--linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl27
1 files changed, 27 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl b/linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
new file mode 100644
index 0000000..f090306
--- /dev/null
+++ b/linden/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
@@ -0,0 +1,27 @@
1/**
2 * @file lightShinyWaterF.glsl
3 *
4 * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
5 * $License$
6 */
7
8
9uniform sampler2D diffuseMap;
10uniform samplerCube environmentMap;
11
12vec3 atmosLighting(vec3 light);
13vec4 applyWaterFog(vec4 color);
14
15void shiny_lighting_water()
16{
17 vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
18 color.rgb *= gl_Color.rgb;
19
20 vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
21 color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
22
23 color.rgb = atmosLighting(color.rgb);
24 color.a = max(color.a, gl_Color.a);
25 gl_FragColor = applyWaterFog(color);
26}
27