summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
diff options
context:
space:
mode:
authorgraham linden <graham@lindenlab.com>2013-04-16 08:28:38 -0700
committergraham linden <graham@lindenlab.com>2013-04-16 08:28:38 -0700
commita054dff522ea874691cd859a8909a29d45cc8bd8 (patch)
treedfe34ed98d1d02d68084d1951fbc8f27f4360e9e /indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
parentc4413f493e65d1c12f382a9fe4363e90c6a1b8c3 (diff)
parentd1f713f30bd4d42fe4696e25c01ab4532ef3b69b (diff)
Merged lindenlab/viewer-development-materials into default
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
index c1f2d90712..11411a605c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
@@ -31,8 +31,12 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
+#if !DEPTH_CLAMP
VARYING float pos_zd2;
+#endif
+
VARYING float pos_w;
+
VARYING float target_pos_x;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -45,10 +49,16 @@ void main()
vec4 pre_pos = vec4(position.xyz, 1.0);
vec4 pos = modelview_projection_matrix * pre_pos;
target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x;
+
pos_w = pos.w;
+
+#if !DEPTH_CLAMP
pos_zd2 = pos.z * 0.5;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
+#else
+ gl_Position = pos;
+#endif
passTextureIndex();