SL-18128 - fix #if !DEPTH_CLAMP in shaders
parent
72e3262532
commit
c467d8f02a
|
|
@ -58,7 +58,7 @@ void main()
|
|||
|
||||
frag_color = vec4(1,1,1,1);
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ uniform sampler2D diffuseMap;
|
|||
VARYING float pos_w;
|
||||
VARYING float target_pos_x;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
VARYING vec4 post_pos;
|
||||
#endif
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ void main()
|
|||
|
||||
frag_color = vec4(1,1,1,1);
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file attachmentShadowV.glsl
|
||||
* @file attachmentAlphaShadowV.glsl
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2007, Linden Research, Inc.
|
||||
|
|
@ -35,7 +35,7 @@ ATTRIBUTE vec2 texcoord0;
|
|||
mat4 getObjectSkinnedTransform();
|
||||
void passTextureIndex();
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
VARYING vec4 post_pos;
|
||||
#endif
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
|
@ -61,7 +61,7 @@ void main()
|
|||
|
||||
vertex_color = diffuse_color;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
p.z = max(p.z, -p.w+0.01);
|
||||
post_pos = p;
|
||||
gl_Position = p;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file treeShadowF.glsl
|
||||
* @file avatarAlphaMaskShadowF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
|
|
@ -32,7 +32,7 @@ out vec4 frag_color;
|
|||
uniform float minimum_alpha;
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
VARYING vec4 post_pos;
|
||||
#endif
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ void main()
|
|||
|
||||
frag_color = vec4(1,1,1,1);
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ uniform float minimum_alpha;
|
|||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
VARYING vec4 post_pos;
|
||||
#endif
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ void main()
|
|||
|
||||
frag_color = vec4(1,1,1,1);
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* @file avatarShadowV.glsl
|
||||
* @file avatarAlphaShadowV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
|
|
@ -34,7 +34,7 @@ ATTRIBUTE vec3 position;
|
|||
ATTRIBUTE vec3 normal;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
VARYING vec4 post_pos;
|
||||
#endif
|
||||
VARYING float pos_w;
|
||||
|
|
@ -66,7 +66,7 @@ void main()
|
|||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
|
||||
#if !DEPTH_CLAMP
|
||||
#if !defined(DEPTH_CLAMP)
|
||||
post_pos = pos;
|
||||
|
||||
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
|
||||
|
|
|
|||
Loading…
Reference in New Issue