diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-16 17:14:41 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-16 17:14:41 -0800 |
commit | 9d1228b5388ce4c39be8a9f156634bd63a608cf2 (patch) | |
tree | e84e5c9424f0c53f263fb53724f60281e30f29d5 /indra/newview | |
parent | c79c4f1477cae232a033e33cc1722b4658cf6634 (diff) | |
parent | e822ecc8035fe2624270c0c81ace9f74dcc8a8e1 (diff) |
Merge with latest
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llvosurfacepatch.cpp | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 830a7778ac..5d0d1ef9a3 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5713,6 +5713,14 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) return; } + + LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; + + if (shader) + { //switch to "solid color" program for SH-2690 -- works around driver bug causing bad triangles when rendering silhouettes + gSolidColorProgram.bind(); + } + gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); gGL.pushUIMatrix(); @@ -5835,6 +5843,11 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) } gGL.popMatrix(); gGL.popUIMatrix(); + + if (shader) + { + shader->bind(); + } } // diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 0108690538..c3a2e6a712 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -1035,6 +1035,8 @@ void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newM { LLVector3 posAgent = getPositionAgent(); LLVector3 scale = getScale(); + //make z-axis scale at least 1 to avoid shadow artifacts on totally flat land + scale.mV[VZ] = llmax(scale.mV[VZ], 1.f); newMin.load3( (posAgent-scale*0.5f).mV); // Changing to 2.f makes the culling a -little- better, but still wrong newMax.load3( (posAgent+scale*0.5f).mV); LLVector4a pos; |