summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/lightV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/transportF.glsl12
3 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl
index 48c883d98a..2f64ab25cb 100644
--- a/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class3/lighting/lightV.glsl
@@ -32,7 +32,7 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
{
vec4 c = sumLights(pos, norm, color);
- c.rgb += atmosAmbient() * color.rgb;
+ c.rgb += atmosAmbient() * color.rgb * 0.25;
return c;
}
diff --git a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl
index c0a0d4782d..88dfa8a907 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class3/windlight/atmosphericsF.glsl
@@ -37,22 +37,29 @@ uniform vec4 blue_density;
uniform float haze_horizon;
uniform float haze_density;
uniform float cloud_shadow;
+uniform float density_multiplier;
+uniform float distance_multiplier;
uniform float max_y;
uniform vec4 glow;
uniform float scene_light_strength;
uniform mat3 ssao_effect_mat;
+uniform int no_atmo;
+uniform float sun_moon_glow_factor;
vec3 scaleSoftClipFrag(vec3 light);
vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
{
- light *= atten.r;
- light += additive;
- return (2.0 * light);
+ if (no_atmo == 1)
+ {
+ return light;
+ }
+ light *= atten.r;
+ light += additive;
+ return light * 2.0;
}
vec3 atmosLighting(vec3 light)
{
return atmosFragLighting(light, getAdditiveColor(), getAtmosAttenuation());
}
-
diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
index e7e56087ab..08eb119510 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
@@ -35,10 +35,12 @@ uniform int no_atmo;
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
if (no_atmo == 1)
- {
+ {
return light;
}
- return (light + additive) * atten * 2.0;
+ light *= atten.r;
+ light += additive;
+ return light * 2.0;
}
vec3 atmosTransport(vec3 light)
@@ -48,10 +50,12 @@ vec3 atmosTransport(vec3 light)
vec3 fullbrightAtmosTransport(vec3 light)
{
- return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
+ float brightness = dot(light.rgb, vec3(0.33333));
+ return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * 0.5 + 0.5), getAtmosAttenuation());
}
vec3 fullbrightShinyAtmosTransport(vec3 light)
{
- return atmosTransportFrag(light, getAdditiveColor(), getAtmosAttenuation());
+ float brightness = dot(light.rgb, vec3(0.33333));
+ return atmosTransportFrag(light * 0.5, getAdditiveColor() * (brightness * brightness), getAtmosAttenuation());
}