summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-09-14 21:48:47 +0000
committerRider Linden <rider@lindenlab.com>2018-09-14 21:48:47 +0000
commit636839a47c6881b10d676d19c65d6c34a956622a (patch)
tree7e9bfa4e4490b60908df54f6572b964c4e3a3b3a /indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
parent6298f0b0e3aa8c9d5b71a1c5b26a3232c25601cc (diff)
parent1df7760d315430766bba44d4d4c64480b4a6138f (diff)
Merged in graham_linden/viewer-eep-graham (pull request #88)
SL-9632
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/transportF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
index 82e1d7fe35..9627642b9d 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class2/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) {
+ if (no_atmo == 1)
+ {
+ return light;
+ }
float 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 == 1)
+ {
+ 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 == 1) ? light : atmosFragTransport(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightAtmosTransport(vec3 light) {
- return fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return (no_atmo == 1) ? light : fullbrightFragAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
}
vec3 fullbrightShinyAtmosTransport(vec3 light) {
- return fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
+ return (no_atmo == 1) ? light : fullbrightFragShinyAtmosTransport(light, getAtmosAttenuation(), getAdditiveColor());
}