summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-10-30 15:56:08 +0100
committerGraham Linden <graham@lindenlab.com>2018-10-30 15:56:08 +0100
commit56355cf35412589b0a171f33b7962fd3800c734a (patch)
tree5b1f806798e843f2bf364ddea55bd6303000c7d2 /indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
parent769be699a960610b3804392ad98c31870c642547 (diff)
SL-9966
Port over transport, gamma, atmospherics shader stub updates for per-fragment atmospherics. Fix bindings of current/next noise map when current and next are the same (select only one and force blend factor to 0).
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
index 62f4e51449..b7f117fc5f 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
@@ -23,17 +23,28 @@
* $/LicenseInfo$
*/
-
-
+uniform int no_atmo;
uniform vec4 gamma;
-/// Soft clips the light with a gamma correction
-vec3 scaleSoftClip(vec3 light) {
+vec3 scaleFragSoftClip(vec3 light)
+{
// For compatibility with lower cards. Do nothing.
return light;
}
+/// Soft clips the light with a gamma correction
+vec3 scaleSoftClip(vec3 light)
+{
+ // For compatibility with lower cards. Do nothing.
+ return scaleFragSoftClip(light);
+}
+
+vec3 fullbrightScaleSoftClipFrag(vec3 light, vec3 atten)
+{
+ return (no_atmo == 1) ? light : mix(scaleFragSoftClip(light.rgb), light.rgb, atten);
+}
+
vec3 fullbrightScaleSoftClip(vec3 light) {
- return scaleSoftClip(light);
+ return fullbrightScaleSoftClipFrag(light, vec3(1));
}