summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-11-10 11:39:08 -0600
committerDave Parks <davep@lindenlab.com>2011-11-10 11:39:08 -0600
commitc8f558f6775d62f03d6caab19668df80e95e8a8b (patch)
treeb74dd0d7e34bf670ebf59b2f37c6c7509f599d87
parentaa8f3d30704ea43a8fc2f9262a57968277c4db20 (diff)
SH-2240 Better fix for red moon -- stop special casing "highlight_color" as a parameter.
-rw-r--r--indra/llrender/llshadermgr.cpp3
-rw-r--r--indra/llrender/llshadermgr.h1
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightF.glsl4
-rw-r--r--indra/newview/lldrawpoolalpha.cpp3
-rw-r--r--indra/newview/lldrawpoolterrain.cpp2
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp1
-rw-r--r--indra/newview/pipeline.cpp7
7 files changed, 8 insertions, 13 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index b390037a9c..e30ef73686 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -965,8 +965,7 @@ void LLShaderMgr::initAttribsAndUniforms()
llassert(mReservedUniforms.size() == LLShaderMgr::PROJECTOR_AMBIENT_LOD+1);
mReservedUniforms.push_back("color");
- mReservedUniforms.push_back("highlight_color");
-
+
mReservedUniforms.push_back("diffuseMap");
mReservedUniforms.push_back("specularMap");
mReservedUniforms.push_back("bumpMap");
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 82ce2dfff2..6ee95339f2 100644
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -70,7 +70,6 @@ public:
PROJECTOR_LOD,
PROJECTOR_AMBIENT_LOD,
DIFFUSE_COLOR,
- HIGHLIGHT_COLOR,
DIFFUSE_MAP,
SPECULAR_MAP,
BUMP_MAP,
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index 574adeb50c..ecbc30f05f 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -27,12 +27,12 @@
out vec4 gl_FragColor;
#endif
-uniform vec4 highlight_color;
+uniform vec4 color;
uniform sampler2D diffuseMap;
VARYING vec2 vary_texcoord0;
void main()
{
- gl_FragColor = highlight_color*texture2D(diffuseMap, vary_texcoord0.xy);
+ gl_FragColor = color*texture2D(diffuseMap, vary_texcoord0.xy);
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 54f937d8fd..ddb7d3ceeb 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -327,8 +327,9 @@ void LLDrawPoolAlpha::render(S32 pass)
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
+
gGL.diffuseColor4f(1,0,0,1);
-
+
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index addb18a1d5..b8e653c5de 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -246,7 +246,7 @@ void LLDrawPoolTerrain::render(S32 pass)
sShader->unbind();
sShader = &gHighlightProgram;
sShader->bind();
- sShader->uniform4f(LLShaderMgr::HIGHLIGHT_COLOR, 1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 22b06d1aef..caf15fe1cb 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -283,7 +283,6 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (gPipeline.canUseVertexShaders())
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4fv(LLShaderMgr::HIGHLIGHT_COLOR, 1, color.mV);
}
LLFacePool::LLOverrideFaceColor color_override(this, color);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 49f83fdb0d..3f91c3cddc 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3583,7 +3583,7 @@ void LLPipeline::renderHighlights()
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,1,1,0.5f);
+ gGL.diffuseColor4f(1,1,1,0.5f);
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
@@ -3613,10 +3613,7 @@ void LLPipeline::renderHighlights()
{
// Paint 'em red!
color.setVec(1.f, 0.f, 0.f, 0.5f);
- if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
- {
- gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,0,0,0.5f);
- }
+
int count = mHighlightFaces.size();
for (S32 i = 0; i < count; i++)
{