diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl index fde0e97713..4261f943fb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl @@ -4,6 +4,8 @@ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. * $License$ */ + +#version 120 vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); mat4 getObjectSkinnedTransform(); @@ -22,6 +24,9 @@ varying vec3 vary_ambient; varying vec3 vary_directional; varying vec3 vary_normal; varying vec3 vary_light; +varying vec3 vary_fragcoord; + +uniform float near_clip; void main() { @@ -38,7 +43,8 @@ void main() norm = gl_Vertex.xyz + gl_Normal.xyz; norm = normalize(( trans*vec4(norm, 1.0) ).xyz-pos.xyz); - gl_Position = gl_ProjectionMatrix * pos; + vec4 frag_pos = gl_ProjectionMatrix * pos; + gl_Position = frag_pos; vary_position = pos.xyz; vary_normal = norm; @@ -70,6 +76,8 @@ void main() gl_FrontColor = col; gl_FogFragCoord = pos.z; + + vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip); } |