summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
diff options
context:
space:
mode:
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());
}