diff options
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index fd1191547b..4825418fe3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -176,8 +176,9 @@ vec3 post_env = color.rgb; if (norm.w < 1) { #if !defined(SUNLIGHT_KILL) + additive *= spec.a; float additive_angular_atten = max(0.0, dot(light_dir, normalize(pos.xyz))); - color = atmosFragLighting(color, additive * additive_angular_atten * (1.0 - spec.a), atten); + color = atmosFragLighting(color, additive * additive_angular_atten, atten); color = scaleSoftClipFrag(color); #endif } diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl index 5f345078b6..b7bc92c460 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl @@ -69,7 +69,7 @@ void main() #endif frag_data[0] = outColor; - frag_data[1] = vec4(0.0,0.0,0.0,1.0); + frag_data[1] = vec4(0.0,0.0,0.0,-1.0); vec3 nvn = normalize(vary_normal); frag_data[2] = vec4(encode_normal(nvn.xyz), 0.0, 0.0); } diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index ee39fa81f5..d4d69f07e8 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -185,8 +185,9 @@ vec3 post_env = color.rgb; { #if !defined(SUNLIGHT_KILL) vec3 p = normalize(pos.xyz); + additive *= spec.a; float additive_angular_atten = max(0.0, dot(light_dir.xyz, p.xyz)); - color = atmosFragLighting(color, additive * additive_angular_atten * (1.0 - spec.a), atten); + color = atmosFragLighting(color, additive * additive_angular_atten, atten); color = scaleSoftClipFrag(color); #endif } |