summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-20 14:37:24 -0500
committerDave Parks <davep@lindenlab.com>2010-10-20 14:37:24 -0500
commit5d5cb7a08344915a11bb43954212444fec073e7c (patch)
treef27078650cd68d233ac515e2e05c565d9d062a7d
parent30b44b238ba6ff8ff6dc29161f3ff6ee85a27f06 (diff)
Fix for broken shadows on rigged attachments when attachment penetrates shadow frustum near clip plane.
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
index 1626e21cd8..5ae41cb730 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
@@ -1,5 +1,5 @@
/**
- * @file diffuseSkinnedV.glsl
+ * @file attachmentShadowV.glsl
*
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
* $License$
@@ -21,5 +21,7 @@ void main()
gl_FrontColor = gl_Color;
- gl_Position = gl_ProjectionMatrix*vec4(pos, 1.0);
+ vec4 p = gl_ProjectionMatrix * vec4(pos, 1.0);
+ p.z = max(p.z, -p.w+0.01);
+ gl_Position = p;
}