summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/windlight
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/windlight')
-rw-r--r--indra/newview/app_settings/shaders/class3/windlight/transportF.glsl24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
index 7f74122665..90ab5d2793 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class3/windlight/transportF.glsl
@@ -30,21 +30,35 @@
vec3 getAdditiveColor();
vec3 getAtmosAttenuation();
+uniform int no_atmo;
+
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
- return (light + additive) * atten * 2.0;
+ if (no_atmo == 1)
+ {
+ return light;
+ }
+ return (light + additive) * atten * 2.0;
}
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
- float brightness = dot(light.rgb, vec3(0.33333));
- return mix(atmosTransportFrag(light.rgb, additive,atten), light.rgb + additive.rgb, brightness * brightness);
+ if (no_atmo == 1)
+ {
+ return light;
+ }
+ float brightness = dot(light.rgb, vec3(0.33333));
+ return mix(atmosTransportFrag(light.rgb, additive,atten), light.rgb + additive.rgb, brightness * brightness);
}
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
- float brightness = dot(light.rgb, vec3(0.33333));
- return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
+ if (no_atmo == 1)
+ {
+ return light;
+ }
+ float brightness = dot(light.rgb, vec3(0.33333));
+ return mix(atmosTransportFrag(light.rgb, additive, atten), (light.rgb + additive.rgb) * (2.0 - brightness), brightness * brightness);
}
vec3 atmosTransport(vec3 light)