summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-07-21 16:29:05 -0700
committerGraham Linden <graham@lindenlab.com>2013-07-21 16:29:05 -0700
commit710b529372f4d7da699318c4761963ae9dde9a63 (patch)
treea8dd5b4f4b3903951c2320b6929fa45e5b2956f7 /indra/newview
parentb8e23afe8185b69102d28acdc5905225e1a97914 (diff)
NORSPEC-311 NORSPEC-312 make mac happy with shader ifdefs for haze/masking
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl4
-rwxr-xr-xindra/newview/llviewershadermgr.cpp1
4 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 69b0f8f012..69b29269c7 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -136,7 +136,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc)
}
#endif
-#if WATER_FOG
+#ifdef WATER_FOG
uniform vec4 waterPlane;
uniform vec4 waterFogColor;
uniform float waterFogDensity;
@@ -330,7 +330,7 @@ void main()
color.rgb = linear_to_srgb(color.rgb);
-#if WATER_FOG
+#ifdef WATER_FOG
color = applyWaterFogDeferred(pos.xyz, color);
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 1e8df68a72..a6f55dfb46 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -42,7 +42,7 @@ VARYING vec2 vary_texcoord0;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
-#if HAS_ALPHA_MASK
+#ifdef HAS_ALPHA_MASK
uniform float minimum_alpha;
#endif
@@ -122,7 +122,7 @@ void main()
float final_alpha = color.a * vertex_color.a;
-#if HAS_ALPHA_MASK
+#ifdef HAS_ALPHA_MASK
if (color.a < minimum_alpha)
{
discard;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
index 22f47b7572..8e899e3e0f 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl
@@ -40,7 +40,7 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-#if WATER_FOG
+#ifdef WATER_FOG
VARYING vec3 vary_position;
#endif
@@ -57,7 +57,7 @@ void main()
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
-#if WATER_FOG
+#ifdef WATER_FOG
vary_position = pos.xyz;
#endif
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index f0e4825279..25f2fbda07 100755
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1528,7 +1528,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAlphaProgram.addPermutation("USE_INDEXED_TEX", "1");
//gDeferredAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
- gDeferredAlphaProgram.addPermutation("WATER_FOG", "0");
gDeferredAlphaProgram.addPermutation("HAS_SHADOW", mVertexShaderLevel[SHADER_DEFERRED] > 1 ? "1" : "0");
gDeferredAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];