summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-17 08:32:09 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-17 08:32:09 -0800
commit066eb59808d5649c745fdc6c37b62f2eb9a19b6f (patch)
treef020f149739116455ff83dd94fbc62884a619916 /indra/newview/app_settings/shaders/class3/deferred
parent042454bda9506185ebf82e3bbdf4305214d6af84 (diff)
SL-10368
Fix OSX shader compile bug from use of #if FOO instead of #ifdef FOO or #if defined(FOO) preventing atmospherics (and thus ALM) from working on OSX.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/attachmentShadowV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/avatarShadowF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/avatarShadowV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/cloudShadowV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowCubeV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/shadowV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/treeShadowF.glsl2
12 files changed, 22 insertions, 24 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class3/deferred/attachmentShadowV.glsl
index 3be9cb3de8..1a655e6467 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/attachmentShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/attachmentShadowV.glsl
@@ -42,10 +42,8 @@ void main()
pos = (mat*vec4(position.xyz, 1.0));
pos = projection_matrix * vec4(pos.xyz, 1.0);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
pos.z = max(pos.z, -pos.w+0.01);
- gl_Position = pos;
-#else
- gl_Position = pos;
#endif
+ gl_Position = pos;
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/avatarShadowF.glsl b/indra/newview/app_settings/shaders/class3/deferred/avatarShadowF.glsl
index f4e5a61e36..48eefc7a73 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/avatarShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/avatarShadowF.glsl
@@ -33,7 +33,7 @@ out vec4 frag_color;
uniform sampler2D diffuseMap;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING vec4 post_pos;
#endif
@@ -45,7 +45,7 @@ void main()
{
frag_color = computeMoments(length(pos), 1.0);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
#endif
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/avatarShadowV.glsl b/indra/newview/app_settings/shaders/class3/deferred/avatarShadowV.glsl
index 96ca2fd707..164b355f20 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/avatarShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/avatarShadowV.glsl
@@ -31,7 +31,7 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING vec4 post_pos;
#endif
@@ -56,7 +56,7 @@ void main()
pos = projection_matrix * pos;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
#else
diff --git a/indra/newview/app_settings/shaders/class3/deferred/cloudShadowV.glsl b/indra/newview/app_settings/shaders/class3/deferred/cloudShadowV.glsl
index cb27b2c2c5..effb070f93 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/cloudShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/cloudShadowV.glsl
@@ -31,7 +31,7 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -49,7 +49,7 @@ void main()
pos = modelview_projection_matrix * pre_pos;
target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
pos_zd2 = pos.z * 0.5;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
#else
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendF.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendF.glsl
index 01599d81c4..345c07a354 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendF.glsl
@@ -33,7 +33,7 @@ out vec4 frag_color;
uniform sampler2D diffuseMap;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -52,7 +52,7 @@ void main()
frag_color = computeMoments(length(pos), float a);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
gl_FragDepth = max(pos_zd2/pos_w+0.5, 0.0);
#endif
}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendV.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendV.glsl
index 3fb2bafca4..af1461c297 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaBlendV.glsl
@@ -31,7 +31,7 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -51,7 +51,7 @@ void main()
pos_w = pos.w;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
pos_zd2 = pos.z * 0.5;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskF.glsl
index d6ed5b6bb0..50f1ffd626 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskF.glsl
@@ -33,7 +33,7 @@ out vec4 frag_color;
uniform sampler2D diffuseMap;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -67,7 +67,7 @@ void main()
frag_color = computeMoments(length(pos.xyz), alpha);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
gl_FragDepth = max(pos_zd2/pos_w+0.5, 0.0);
#endif
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskV.glsl
index bc7fe003f2..6a646f5e9e 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowAlphaMaskV.glsl
@@ -31,7 +31,7 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -51,7 +51,7 @@ void main()
target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
pos_zd2 = pos.z * 0.5;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowCubeV.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowCubeV.glsl
index 923de09ada..db8c75fb8a 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowCubeV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowCubeV.glsl
@@ -27,7 +27,7 @@ uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING vec4 post_pos;
#endif
@@ -40,7 +40,7 @@ void main()
vec3 p = position*box_size+box_center;
vec4 pos = modelview_projection_matrix*vec4(p.xyz, 1.0);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowF.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowF.glsl
index 5a6c8728c0..3350267130 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowF.glsl
@@ -33,7 +33,7 @@ out vec4 frag_color;
uniform sampler2D diffuseMap;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
diff --git a/indra/newview/app_settings/shaders/class3/deferred/shadowV.glsl b/indra/newview/app_settings/shaders/class3/deferred/shadowV.glsl
index 9a5edaf091..6577fe0ecf 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/shadowV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/shadowV.glsl
@@ -30,7 +30,7 @@ uniform mat4 texture_matrix0;
ATTRIBUTE vec3 position;
ATTRIBUTE vec2 texcoord0;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
VARYING float pos_zd2;
#endif
@@ -50,7 +50,7 @@ void main()
target_pos_x = 0.5 * (shadow_target_width - 1.0) * pos.x;
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
pos_zd2 = pos.z * 0.5;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeShadowF.glsl
index 693af31bf2..41673d1669 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/treeShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/treeShadowF.glsl
@@ -51,7 +51,7 @@ void main()
frag_color = computeMoments(length(pos), 1.0);
-#if !DEPTH_CLAMP
+#if !defined(DEPTH_CLAMP)
gl_FragDepth = max(pos.z/pos.w*0.5+0.5, 0.0);
#endif