summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-08-11 12:49:05 -0500
committerDave Parks <davep@lindenlab.com>2011-08-11 12:49:05 -0500
commit610764fbfce75f54c95d4b10c2a8f9482a7a7b80 (patch)
tree7bb208e926ad66481d53a0e960c37d7f4aac4d90
parent17f46868d28876b65adcf24a45e6c19a20f2834c (diff)
SH-2181 Fix for occlusion culling going bonkers when ban lines are present.
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/impostorF.glsl38
-rw-r--r--indra/newview/llglsandbox.cpp2
-rw-r--r--indra/newview/pipeline.cpp21
3 files changed, 32 insertions, 29 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
index 7257132f06..13597ee439 100644
--- a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
@@ -5,22 +5,22 @@
* $/LicenseInfo$
*/
-uniform float minimum_alpha;
-uniform float maximum_alpha;
-
-vec3 fullbrightAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
-
-uniform sampler2D diffuseMap;
-
-void main()
-{
- vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
-
- if (color.a < minimum_alpha || color.a > maximum_alpha)
- {
- discard;
- }
-
- gl_FragColor = color;
-}
+uniform float minimum_alpha;
+uniform float maximum_alpha;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+uniform sampler2D diffuseMap;
+
+void main()
+{
+ vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
+
+ if (color.a < minimum_alpha || color.a > maximum_alpha)
+ {
+ discard;
+ }
+
+ gl_FragColor = color;
+}
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 842911ecc0..fa3f546157 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -620,7 +620,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
F32 pos_y = pos.mV[VY];
LLGLSUIDefault gls_ui;
- LLGLDepthTest gls_depth(GL_TRUE);
+ LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
if (mCollisionBanned == BA_BANNED)
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 01ff1bb16f..7a26404138 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3340,13 +3340,15 @@ void render_hud_elements()
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
gGL.color4f(1,1,1,1);
- if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+
+ if (LLGLSLShader::sNoFixedFunction)
{
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.bind();
- }
+ gUIProgram.bind();
+ }
+ LLGLDepthTest depth(GL_TRUE, GL_FALSE);
+ if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
+ {
LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
@@ -3360,10 +3362,6 @@ void render_hud_elements()
// Render name tags.
LLHUDObject::renderAll();
- if (LLGLSLShader::sNoFixedFunction)
- {
- gUIProgram.unbind();
- }
}
else if (gForceRenderLandFence)
{
@@ -3374,6 +3372,11 @@ void render_hud_elements()
{
LLHUDText::renderAllHUD();
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.unbind();
+ }
gGL.flush();
}