summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting/lightV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightV.glsl17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
index 8045809b82..5e39d1629d 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
@@ -1,5 +1,5 @@
/**
- * @file lightV.glsl
+ * @file class1\lighting\lightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -26,11 +26,18 @@
// All lights, no specular highlights
+vec3 atmosAmbient();
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color);
+float getAmbientClamp();
-vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight);
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
{
- return sumLights(pos, norm, color, baseLight);
+ vec4 c = sumLights(pos, norm, color);
+
+#if !defined(AMBIENT_KILL)
+ c.rgb += atmosAmbient() * color.rgb * 0.5 * getAmbientClamp();
+#endif
+
+ return c;
}