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.glsl19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
index f2764b72c3..187876acf7 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
@@ -30,8 +30,8 @@ uniform int no_atmo;
vec3 getAtmosAttenuation();
-/// Soft clips the light with a gamma correction
-vec3 scaleSoftClip(vec3 light) {
+vec3 scaleSoftClipFrag(vec3 light)
+{
if (no_atmo == 1)
{
return light;
@@ -39,16 +39,21 @@ vec3 scaleSoftClip(vec3 light) {
//soft clip effect:
light = 1. - clamp(light, vec3(0.), vec3(1.));
light = 1. - pow(light, gamma.xxx);
-
return light;
}
-vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 atten)
+vec3 scaleSoftClip(vec3 light)
+{
+ return scaleSoftClipFrag(light);
+}
+
+vec3 fullbrightScaleSoftClipFrag(vec3 light)
{
- return (no_atmo == 1) ? light : mix(scaleSoftClip(light.rgb), light.rgb, atten);
+ return scaleSoftClipFrag(light.rgb);
}
-vec3 fullbrightScaleSoftClip(vec3 light) {
- return (no_atmo == 1) ? light : fullbrightScaleSoftClipFrag(light.rgb, getAtmosAttenuation());
+vec3 fullbrightScaleSoftClip(vec3 light)
+{
+ return fullbrightScaleSoftClipFrag(light.rgb);
}