summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llglslshader.cpp5
-rw-r--r--indra/llrender/llglslshader.h2
-rw-r--r--indra/llrender/llshadermgr.cpp3
-rw-r--r--indra/llrender/llshadermgr.h2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/impostorF.glsl3
-rw-r--r--indra/newview/lldrawpoolalpha.cpp16
-rw-r--r--indra/newview/lldrawpoolavatar.cpp12
-rw-r--r--indra/newview/lldrawpoolsimple.cpp4
-rw-r--r--indra/newview/lldrawpooltree.cpp6
-rw-r--r--indra/newview/lltexlayer.cpp34
-rw-r--r--indra/newview/pipeline.cpp4
27 files changed, 63 insertions, 77 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index d6ab5208c6..5a6f3d8292 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -1009,9 +1009,8 @@ void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v)
}
}
-void LLGLSLShader::setAlphaRange(F32 minimum, F32 maximum)
+void LLGLSLShader::setMinimumAlpha(F32 minimum)
{
gGL.flush();
- uniform1f("minimum_alpha", minimum);
- uniform1f("maximum_alpha", maximum);
+ uniform1f(LLShaderMgr::MINIMUM_ALPHA, minimum);
}
diff --git a/indra/llrender/llglslshader.h b/indra/llrender/llglslshader.h
index eb19599eca..2a6c050eac 100644
--- a/indra/llrender/llglslshader.h
+++ b/indra/llrender/llglslshader.h
@@ -108,7 +108,7 @@ public:
void uniformMatrix3fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
void uniformMatrix4fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
- void setAlphaRange(F32 minimum, F32 maximum);
+ void setMinimumAlpha(F32 minimum);
void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void vertexAttrib4fv(U32 index, GLfloat* v);
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 810afe210d..84dc768983 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -1009,6 +1009,9 @@ void LLShaderMgr::initAttribsAndUniforms()
llassert(mReservedUniforms.size() == LLShaderMgr::GLOW_DELTA+1);
+
+ mReservedUniforms.push_back("minimum_alpha");
+
mReservedUniforms.push_back("shadow_matrix");
mReservedUniforms.push_back("env_mat");
mReservedUniforms.push_back("shadow_clip");
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 9cc2f1bd7f..a5150b3e51 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -107,6 +107,8 @@ public:
GLOW_STRENGTH,
GLOW_DELTA,
+ MINIMUM_ALPHA,
+
DEFERRED_SHADOW_MATRIX,
DEFERRED_ENV_MAT,
DEFERRED_SHADOW_CLIP,
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
index 14b79c37fd..e9989a4e48 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
index 381fba8813..fdf8d72b38 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -30,7 +30,6 @@ out vec4 gl_FragData[3];
VARYING vec3 vary_normal;
uniform float minimum_alpha;
-uniform float maximum_alpha;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -39,7 +38,7 @@ void main()
{
vec4 col = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
index b582ba7f9c..bb20e2ca47 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -29,7 +29,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index 5decddebbb..a44173a2a4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -41,7 +40,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 71b12326d8..46d42d2a4a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
- if (alpha < minimum_alpha || alpha > maximum_alpha)
+ if (alpha < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index b934bc6991..ea98d6884c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -34,12 +34,11 @@ VARYING vec3 vary_normal;
VARYING vec2 vary_texcoord0;
uniform float minimum_alpha;
-uniform float maximum_alpha;
void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
index 29ec6e6bee..20d0170535 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -39,7 +38,7 @@ void main()
{
float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a;
- if (alpha < minimum_alpha || alpha > maximum_alpha)
+ if (alpha < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
index 4f2767fc97..d2f5e1987a 100644
--- a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
@@ -30,7 +30,6 @@ out vec4 gl_FragColor;
uniform sampler2D diffuseMap;
uniform float minimum_alpha;
-uniform float maximum_alpha;
VARYING vec2 vary_texcoord0;
VARYING vec4 vertex_color;
@@ -38,7 +37,7 @@ VARYING vec4 vertex_color;
void main()
{
vec4 col = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index 6815f7aa85..10413bdeb0 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@@ -40,7 +39,7 @@ void default_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
index 2640668d7d..1164e5b0a6 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -28,8 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
-
uniform sampler2D diffuseMap;
@@ -43,7 +41,7 @@ void default_lighting()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
index 92113d9afa..ba99c0ed71 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -40,7 +39,7 @@ void fullbright_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
index d1ad3da009..276fad4f44 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -42,7 +41,7 @@ void fullbright_lighting()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
index 32a1c71099..754b2922d9 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec4 diffuseLookup(vec2 texcoord);
@@ -42,7 +41,7 @@ void fullbright_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
index 1b5aa61441..f69b907dc7 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -42,7 +41,7 @@ void fullbright_lighting_water()
{
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
index 60289cf7f7..103dd633c9 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 atmosLighting(vec3 light);
vec4 applyWaterFog(vec4 color);
@@ -40,7 +39,7 @@ void default_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
index d0038ae89b..bef72752da 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -42,7 +41,7 @@ void default_lighting_water()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
index e7c81888eb..3c6e22b295 100644
--- a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -38,7 +37,7 @@ void main()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 230c4e2638..54f937d8fd 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -90,7 +90,7 @@ void LLDrawPoolAlpha::renderDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GRASS);
gDeferredDiffuseAlphaMaskProgram.bind();
- gDeferredDiffuseAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
+ gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f);
//render alpha masked objects
LLRenderPass::pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
@@ -136,7 +136,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
simple_shader = NULL;
fullbright_shader = NULL;
gObjectFullbrightAlphaMaskProgram.bind();
- gObjectFullbrightAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
+ gObjectFullbrightAlphaMaskProgram.setMinimumAlpha(0.33f);
}
deferred_render = TRUE;
@@ -232,14 +232,14 @@ void LLDrawPoolAlpha::render(S32 pass)
if (!LLPipeline::sRenderDeferred || !deferred_render)
{
simple_shader->bind();
- simple_shader->setAlphaRange(0.33f, 1.f);
+ simple_shader->setMinimumAlpha(0.33f);
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
if (fullbright_shader)
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.33f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.33f);
}
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
//LLGLSLShader::bindNoShader();
@@ -275,16 +275,16 @@ void LLDrawPoolAlpha::render(S32 pass)
if (LLPipeline::sImpostorRender)
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.5f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.5f);
simple_shader->bind();
- simple_shader->setAlphaRange(0.5f, 1.f);
+ simple_shader->setMinimumAlpha(0.5f);
}
else
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.f);
simple_shader->bind();
- simple_shader->setAlphaRange(0.f, 1.f);
+ simple_shader->setMinimumAlpha(0.f);
}
}
else
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 7290a48a1a..60313b25a0 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -576,7 +576,7 @@ void LLDrawPoolAvatar::beginImpostor()
if (LLGLSLShader::sNoFixedFunction)
{
gImpostorProgram.bind();
- gImpostorProgram.setAlphaRange(0.01f, 1.f);
+ gImpostorProgram.setMinimumAlpha(0.01f);
}
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
@@ -608,7 +608,7 @@ void LLDrawPoolAvatar::beginRigid()
if (sVertexProgram != NULL)
{ //eyeballs render with the specular shader
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
}
else
@@ -641,7 +641,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.01f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.01f);
}
void LLDrawPoolAvatar::endDeferredImpostor()
@@ -659,7 +659,7 @@ void LLDrawPoolAvatar::beginDeferredRigid()
sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
void LLDrawPoolAvatar::endDeferredRigid()
@@ -716,7 +716,7 @@ void LLDrawPoolAvatar::beginSkinned()
if (LLGLSLShader::sNoFixedFunction)
{
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
}
@@ -1014,7 +1014,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
sRenderingSkinned = TRUE;
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
gGL.getTexUnit(0)->activate();
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 80c202d4e2..6e0ea78af2 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -269,7 +269,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
if (mVertexShaderLevel > 0)
{
simple_shader->bind();
- simple_shader->setAlphaRange(0.5f, 1.f);
+ simple_shader->setMinimumAlpha(0.5f);
}
else
{
@@ -325,7 +325,7 @@ void LLDrawPoolGrass::renderDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
- gDeferredNonIndexedDiffuseAlphaMaskProgram.setAlphaRange(0.5f, 1.f);
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
}
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index cdf6e1ab52..d198e28c14 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -75,7 +75,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
if (gPipeline.canUseVertexShaders())
{
shader->bind();
- shader->setAlphaRange(0.5f, 1.f);
+ shader->setMinimumAlpha(0.5f);
gGL.diffuseColor4f(1,1,1,1);
}
else
@@ -144,7 +144,7 @@ void LLDrawPoolTree::beginDeferredPass(S32 pass)
shader = &gDeferredTreeProgram;
shader->bind();
- shader->setAlphaRange(0.5f, 1.f);
+ shader->setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderDeferred(S32 pass)
@@ -170,7 +170,7 @@ void LLDrawPoolTree::beginShadowPass(S32 pass)
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.5f, 1.f);
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderShadow(S32 pass)
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 9f5cbf6ec8..6f6d5dbf12 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -300,7 +300,7 @@ BOOL LLTexLayerSetBuffer::render()
if (use_shaders)
{
gAlphaMaskProgram.bind();
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
LLVertexBuffer::unbind();
@@ -947,7 +947,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.0f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@@ -957,7 +957,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -987,7 +987,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -999,7 +999,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1135,7 +1135,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@@ -1145,7 +1145,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1717,7 +1717,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
LLGLDisable alpha_test(no_alpha_test ? GL_ALPHA_TEST : 0);
if (use_shaders && no_alpha_test)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
@@ -1731,7 +1731,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
if (use_shaders && no_alpha_test)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1768,14 +1768,14 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv( net_color.mV );
gl_rect_2d_simple( width, height );
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1874,14 +1874,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLSNoAlphaTest gls_no_alpha_test;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
else
@@ -1899,7 +1899,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLSNoAlphaTest gls_no_alpha_test;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
@@ -1907,7 +1907,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
success = TRUE;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
}
@@ -1931,7 +1931,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.setColorMask(false, true);
@@ -2011,7 +2011,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
LLGLSUIDefault gls_ui;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76ddeab203..152f4728dd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8154,10 +8154,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
- gDeferredShadowAlphaMaskProgram.setAlphaRange(0.598f, 1.f);
+ gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.598f, 1.f);
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
}