diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index b390037a9c04fe29cba783d2bc60e74eccd0dce2..e30ef73686afa7541c24b3aca113651e8bb48354 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 82ce2dfff2525cd7c79c7feacc49cb0246d63e05..6ee95339f2e006337ee2f62dbe848c74fa4de532 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -70,7 +70,6 @@ class LLShaderMgr 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 574adeb50c4aa93f70ce0ee5ad9489eda23c567a..ecbc30f05fff8fba0172bd319841f98c6c059e70 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 54f937d8fd4d84896e00f8196de76e5ddfce621e..ddb7d3ceebd2bf62ca0710bbe630aec2d0f09551 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 addb18a1d5bee2d2ece91a78600a61ca9d894f11..b8e653c5de82f4635c3ac2ddb0cf14fe5f3c07fa 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 22b06d1aefa85fd33d447537e5f9f3dc992c06b2..caf15fe1cbb0616719f98e98b7989980ad2c9f38 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 49f83fdb0d6337359118d90e24cc00952c500c7f..3f91c3cddceb6bf12bf5db6962499706f6feb778 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++) {