aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl')
-rw-r--r--linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl25
1 files changed, 0 insertions, 25 deletions
diff --git a/linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl b/linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl
deleted file mode 100644
index 7a9245f..0000000
--- a/linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl
+++ /dev/null
@@ -1,25 +0,0 @@
1uniform sampler2D scatterMap;
2
3//for per-pixel scatter
4vec4 getScatter(vec3 viewVec, vec3 lightDir)
5{
6 vec2 scatterCoord;
7 scatterCoord.x = length(viewVec);
8 vec3 normVec = viewVec / scatterCoord.x;
9 scatterCoord.y = dot(normVec, lightDir)*0.5 + 0.5;
10 scatterCoord.x = scatterCoord.x / gl_Fog.end;
11 scatterCoord.x *= scatterCoord.x; // HACK!! Remove this when we can push the view distance farther out
12 return texture2D(scatterMap, scatterCoord) * vec4(gl_Fog.color.rgb, 1.0);
13}
14
15void applyScatter(inout vec3 color, vec4 haze)
16{
17 color.rgb = haze.rgb + haze.a * color.rgb;
18}
19
20//for per-vertex scatter
21void applyScatter(inout vec3 color)
22{
23 vec4 haze = texture2D(scatterMap, gl_TexCoord[5].xy) * vec4(gl_Fog.color.rgb, 1.0);
24 color.rgb = haze.rgb + haze.a * color.rgb;
25}