diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/app_settings/shaders/class3/environment/scatterF.glsl | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
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.glsl | 25 |
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 @@ | |||
1 | uniform sampler2D scatterMap; | ||
2 | |||
3 | //for per-pixel scatter | ||
4 | vec4 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 | |||
15 | void applyScatter(inout vec3 color, vec4 haze) | ||
16 | { | ||
17 | color.rgb = haze.rgb + haze.a * color.rgb; | ||
18 | } | ||
19 | |||
20 | //for per-vertex scatter | ||
21 | void 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 | } | ||