summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-09-14 18:42:41 +0100
committerGraham Linden <graham@lindenlab.com>2018-09-14 18:42:41 +0100
commita167f8857fd242e007a6bcbcee80a54a953f29f3 (patch)
treee49130828875091768b4aef1c170b48522fdedea /indra/newview/app_settings/shaders/class2/deferred
parent46d194d352a7da88e7a9c96fba404c61a1bddb89 (diff)
SL-1491
Fix name at top of the 3 softenLight shaders so we can differentiate which is in use when using nSight debug. Made class2 softenLightF shader modulate the atmospherics additive to only specular shading to fix lens flare on terrain etc.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl11
1 files changed, 3 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 1e2c49215f..c7950a2a31 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -165,8 +165,6 @@ void main()
if (spec.a > 0.0) // specular reflection
{
// the old infinite-sky shiny reflection
- //
-
float sa = dot(refnormpersp, sun_dir.xyz);
vec3 dumbshiny = sunlit*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r);
@@ -182,17 +180,14 @@ void main()
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
-
vec3 refcol = textureCube(environmentMap, env_vec).rgb;
-
- col = mix(col.rgb, refcol,
- envIntensity);
-
+ col = mix(col.rgb, refcol, envIntensity);
}
if (norm.w < 0.5)
{
- col = mix(atmosFragLighting(col, additive, atten), fullbrightFragAtmosTransport(col, atten, additive), diffuse.a);
+ vec3 add = additive * spec.a;
+ col = mix(atmosFragLighting(col, add, atten), fullbrightFragAtmosTransport(col, atten, add), diffuse.a);
col = mix(scaleFragSoftClip(col), fullbrightScaleSoftClipFrag(col, atten), diffuse.a);
}