summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-01 00:18:36 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-01 00:18:36 +0100
commit64302d3000b69b31e72eb6a3bd8a981c80cb88de (patch)
treed942aa56bc50bd44542ff5f7757d46a6189e8036 /indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
parent439273c9c11ec5f3c186fd7d97a28d11419153cd (diff)
Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use.
Fix class2 softenLightF shader.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl8
1 files changed, 5 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 c20092bfe0..371b32406c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -82,6 +82,8 @@ vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
vec3 scaleFragSoftClip(vec3 l);
vec3 atmosFragAffectDirectionalLight(float intensity, vec3 sunlit);
void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);
+vec3 fullbrightFragAtmosTransport(vec3 l, vec3 additive, vec3 atten);
+vec3 fullbrightScaleSoftClipFrag(vec3 l, vec3 atten);
vec4 getPosition_d(vec2 pos_screen, float depth)
{
@@ -147,7 +149,7 @@ void main()
calcFragAtmospherics(pos.xyz, ambocc, sunlit, amblit, additive, atten);
- col = atmosAmbient(vec3(0));
+ col = atmosFragAmbient(vec3(0), amblit);
float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0);
ambient *= 0.5;
ambient *= ambient;
@@ -167,7 +169,7 @@ void main()
//
float sa = dot(refnormpersp, sun_dir.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r);
+ vec3 dumbshiny = sunlit*scol_ambocc.r*(texture2D(lightFunc, vec2(sa, spec.a)).r);
// add the two types of shiny together
vec3 spec_contrib = dumbshiny * spec.rgb;
@@ -192,7 +194,7 @@ void main()
if (norm.w < 0.5)
{
col = mix(atmosFragLighting(col, additive, atten), fullbrightFragAtmosTransport(col, atten, additive), diffuse.a);
- col = mix(scaleFragSoftClip(col), fullbrightFragScaleSoftClip(col), diffuse.a);
+ col = mix(scaleFragSoftClip(col), fullbrightScaleSoftClipFrag(col, atten), diffuse.a);
}
#ifdef WATER_FOG