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/deferred/cloudsF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/transportF.glsl24
2 files changed, 19 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl
index 44b41cc0b8..d9fcc0a9ea 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl
@@ -58,13 +58,7 @@ vec4 cloudNoise(vec2 uv)
/// Soft clips the light with a gamma correction
-vec3 scaleSoftClip(vec3 light) {
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
+vec3 scaleSoftClip(vec3 light);
void main()
{
diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
index 82e1d7fe35..e8e9c53c38 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
@@ -32,31 +32,43 @@ vec3 getAtmosAttenuation();
uniform sampler2D cloudMap;
uniform vec4 cloud_pos_density1;
+uniform int no_atmo;
vec3 atmosFragTransport(vec3 light, vec3 atten, vec3 additive) {
- light *= atten.r;
- light += additive * 2.0;
+ if (no_atmo == 0)
+ {
+ light *= atten.r;
+ light += additive * 2.0;
+ }
return light;
}
vec3 fullbrightFragAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
- float brightness = dot(light.rgb, vec3(0.33333));
+ if (no_atmo)
+ {
+ return light;
+ }
+ loat brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosFragTransport(light.rgb, atten, additive), light.rgb + additive.rgb, brightness * brightness);
}
vec3 fullbrightFragShinyAtmosTransport(vec3 light, vec3 atten, vec3 additive) {
+ if (no_atmo)
+ {
+ return light;
+ }
float brightness = dot(light.rgb, vec3(0.33333));
return mix(atmosFragTransport(light.rgb, atten, additive), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
}
vec3 atmosTransport(vec3 light) {
- return atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return no_atmo ? light : atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightAtmosTransport(vec3 light) {
- return fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return no_atmo ? light : fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightShinyAtmosTransport(vec3 light) {
- return fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return no_atmo ? light : fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
}