summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl5
-rw-r--r--indra/newview/pipeline.cpp6
6 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index 5ca210863e..3a7552d23e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -114,7 +114,7 @@ void main()
float rel_pos_len = length(rel_pos);
// Initialize temp variables
- vec3 sunlight = sunlight_color;
+ vec3 sunlight = sunlight_color*2.0;
vec3 light_atten;
// Sunlight attenuation effect (hue and brightness) due to atmosphere
diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
index 6994a20b79..d0269735fd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
@@ -30,6 +30,7 @@
out vec4 frag_color;
uniform sampler2D diffuseRect;
+uniform sampler2D emissiveRect;
uniform float dt;
void main()
@@ -50,7 +51,7 @@ void main()
{
vec2 tc = vec2(x,y);
w += 1.0;
- col += texture(diffuseRect, tc).rgb;
+ col += texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb;
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index 87725affe7..834cf9dc43 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -110,7 +110,7 @@ vec3 toneMap(vec3 color)
{
float exp_sample = texture(exposureMap, vec2(0.5,0.5)).r;
- float exp_scale = clamp(0.1/exp_sample, 0.4, 8.0);
+ float exp_scale = clamp(0.1/exp_sample, 0.5, 8.0);
color *= exposure * exp_scale;
#ifdef TONEMAP_ACES_NARKOWICZ
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 0090155e5c..08fbc4bce8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -91,7 +91,7 @@ void main()
vary_LightNormPosDot = rel_pos_lightnorm_dot;
// Initialize temp variables
- vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color;
+ vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color*0.5;
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
index f9a1f5e4d6..7129718ff8 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
@@ -62,9 +62,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
vec3 rel_pos_norm = normalize(rel_pos);
float rel_pos_len = length(rel_pos);
- float scale = sun_up_factor + 1.0;
- vec3 sunlight = (sun_up_factor == 1) ? sunlight_color: moonlight_color;
- sunlight *= scale;
+ float scale = 2.0;
+ vec3 sunlight = (sun_up_factor == 1) ? sunlight_color * scale: moonlight_color/scale;
// sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7b72d7f987..da8c46de83 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7422,6 +7422,12 @@ void LLPipeline::renderFinalize()
screenTarget()->bindTexture(0, channel, LLTexUnit::TFO_POINT);
}
+ channel = gDeferredPostGammaCorrectProgram.enableTexture(LLShaderMgr::DEFERRED_EMISSIVE, screenTarget()->getUsage());
+ if (channel > -1)
+ {
+ mGlow[1].bindTexture(0, channel, LLTexUnit::TFO_BILINEAR);
+ }
+
static LLStaticHashedString dt("dt");
gExposureProgram.uniform1f(dt, gFrameIntervalSeconds);