summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-01 20:28:47 +0100
committerGraham Linden <graham@lindenlab.com>2018-11-01 20:28:47 +0100
commit4f267a5723e7da2de36b9f2295e4942a4c8bf6c5 (patch)
treec186a8888794732f32bba406b7bb66b4cafd4d11 /indra/newview/app_settings/shaders/class3/deferred
parenta67cf385d763325119f4d2a37beb96c9c6a80282 (diff)
SL-9994
Make shaders use consistent naming and parameter order for transport and atmospheric helpers. Share transport and gamma correction code where possible. Add lots of asserts and other validation for when things don't go as planned. Engage dumpShaderSource to get more source output with shader compilation fail.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl18
1 files changed, 1 insertions, 17 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index d2fd70c9e2..2615400e52 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -115,7 +115,6 @@ void main()
float light_gamma = 1.0/1.3;
da = pow(da, light_gamma);
-
vec4 diffuse = texture2DRect(diffuseRect, tc);
//convert to gamma space
@@ -133,14 +132,6 @@ void main()
float ambocc = scol_ambocc.g;
- vec3 sunlit;
- vec3 amblit;
- vec3 additive;
- vec3 atten;
-
- //calcFragAtmospherics(pos.xyz, ambocc, sunlit, amblit, additive, atten);
- //col += atmosFragAffectDirectionalLight(max(min(da, scol), 0.0), sunlit);
-
col *= diffuse.rgb;
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
@@ -158,8 +149,7 @@ void main()
bloom = dot(spec_contrib, spec_contrib) / 6;
col += spec_contrib;
}
-
-
+
col = mix(col, diffuse.rgb, diffuse.a);
if (envIntensity > 0.0)
@@ -169,12 +159,6 @@ void main()
col = mix(col.rgb, refcol, envintensity);
}
- if (norm.w < 0.5)
- {
- //col = mix(atmosFragLighting(col, additive, atten), fullbrightFragAtmosTransport(col, atten, additive), diffuse.a);
- //col = mix(scaleFragSoftClip(col), fullbrightScaleSoftClipFrag(col, atten), diffuse.a);
- }
-
#ifdef WATER_FOG
vec4 fogged = applyWaterFogView(pos,vec4(col, bloom));
col = fogged.rgb;