summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index d7407332e5..22f52032a5 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -65,7 +65,8 @@ uniform mat3 ssao_effect_mat;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-varying vec4 vary_light;
+uniform vec3 sun_dir;
+
varying vec2 vary_fragcoord;
vec3 vary_PositionEye;
@@ -282,7 +283,7 @@ void main()
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
//vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
+ float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
@@ -309,7 +310,7 @@ void main()
// the old infinite-sky shiny reflection
//
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
+ float sa = dot(refnormpersp, sun_dir.xyz);
vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*texture2D(lightFunc, vec2(sa, spec.a)).a;
// add the two types of shiny together