summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl29
1 files changed, 11 insertions, 18 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
index 206a51db27..800d08047a 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
@@ -1,5 +1,5 @@
-/**
- * @file class1\windlight\atmosphericsHelpersF.glsl
+/**
+ * @file class2\wl\atmosphericsHelpersV.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -22,30 +22,23 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-uniform vec4 sunlight_color;
-uniform vec4 light_ambient;
-uniform int no_atmo;
-vec3 atmosAmbient()
-{
- if (no_atmo == 1) return vec3(0.16);
- return light_ambient.rgb;
-}
+// Output variables
+
+uniform float scene_light_strength;
-vec3 atmosAffectDirectionalLight(float lightIntensity)
+vec3 atmosFragAmbient(vec3 light, vec3 amblit)
{
- return sunlight_color.rgb * lightIntensity;
+ return amblit + light / 2.0;
}
-vec3 atmosGetDiffuseSunlightColor()
+vec3 atmosFragAffectDirectionalLight(float lightIntensity, vec3 sunlit)
{
- return sunlight_color.rgb;
+ return sunlit * lightIntensity;
}
-vec3 scaleDownLight(vec3 light)
+vec3 scaleDownLightFrag(vec3 light)
{
- /* stub function for fallback compatibility on class1 hardware */
- return light;
+ return (light / scene_light_strength );
}