aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/app_settings/shaders/class1/environment/scatterF.glsl
blob: 3aa44de1b32750eec38983a38644e6917c5e9ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
uniform sampler2D scatterMap;

//for per-pixel scatter
vec4 getScatter(vec3 viewVec, vec3 lightDir)
{
   return gl_TexCoord[5];
}

void applyScatter(inout vec3 color)
{
	color = gl_TexCoord[5].a*color + (1.0-gl_TexCoord[5].a) * gl_TexCoord[5].rgb;
}

void applyScatter(inout vec3 color, vec4 haze)
{
	color.rgb = haze.rgb + haze.a * color.rgb;   
}