summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-30 16:16:29 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-30 16:16:29 -0700
commite9b2aa384a84c2e1b5f93f81b72eb028b292ae6a (patch)
treeac005c6aa59279fa224f0bbd65f8ad4dd2b4f2d8 /indra
parentf7bff299f1a243e8c5bfdc2b98ea3c7b549778f1 (diff)
SL-11289
Limit banding from atmo exp falloff calc.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl5
-rw-r--r--indra/newview/pipeline.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index dca2862b5a..5cb63912be 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -127,7 +127,7 @@ void main()
light_atten = (blue_density + vec4(haze_density * 0.25)) * (dens_mul * max_y);
// Calculate relative weights
- temp1 = blue_density + haze_density;
+ temp1 = abs(blue_density) + vec4(abs(haze_density));
blue_weight = blue_density / temp1;
haze_weight = haze_density / temp1;
@@ -142,7 +142,8 @@ void main()
// Transparency (-> temp1)
// ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati
// compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * dist_mul);
+ //temp1 = exp(-temp1 * temp2.z * dist_mul);
+ temp1 = exp(-temp1 * dist_mul);
// Compute haze glow
temp2.x = dot(Pn, lightnorm.xyz);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b01e148fca..33b953beb7 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8403,8 +8403,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_
shader.uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, mSunDiffuse.mV);
shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, mMoonDiffuse.mV);
+
LLEnvironment& environment = LLEnvironment::instance();
+ LLColor4 ambient(environment.getCurrentSky()->getTotalAmbient());
+ shader.uniform4fv(LLShaderMgr::AMBIENT, 1, ambient.mV);
shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
shader.uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, environment.getCurrentSky()->getSunMoonGlowFactor());