summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
index 2db633cd01..f2764b72c3 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
@@ -26,11 +26,16 @@
uniform vec4 gamma;
+uniform int no_atmo;
vec3 getAtmosAttenuation();
/// Soft clips the light with a gamma correction
vec3 scaleSoftClip(vec3 light) {
+ if (no_atmo == 1)
+ {
+ return light;
+ }
//soft clip effect:
light = 1. - clamp(light, vec3(0.), vec3(1.));
light = 1. - pow(light, gamma.xxx);
@@ -40,10 +45,10 @@ vec3 scaleSoftClip(vec3 light) {
vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 atten)
{
- return mix(scaleSoftClip(light.rgb), light.rgb, atten);
+ return (no_atmo == 1) ? light : mix(scaleSoftClip(light.rgb), light.rgb, atten);
}
vec3 fullbrightScaleSoftClip(vec3 light) {
- return fullbrightScaleSoftClipFrag(light.rgb, getAtmosAttenuation());
+ return (no_atmo == 1) ? light : fullbrightScaleSoftClipFrag(light.rgb, getAtmosAttenuation());
}