summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-11-02 13:13:38 -0500
committerDave Parks <davep@lindenlab.com>2011-11-02 13:13:38 -0500
commit2179e1c1f2f3614678d528fe96640728ce663f2e (patch)
treef42b13f36f374e6ba915e85cfacd8ab99183a167 /indra/llrender
parent55f69de90c9b32c7fa25f16ec7d1f41064eff614 (diff)
SH-2541 Fix for speckles on avatar on some cards -- don't use "maximum_alpha" for alpha tests in shaders as it was always being set to 1.0 anyway.
Diffstat (limited to 'indra/llrender')
-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
4 files changed, 8 insertions, 4 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,