summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-06-08 19:15:04 -0500
committerDave Parks <davep@lindenlab.com>2011-06-08 19:15:04 -0500
commit7f36558d80d526502d8be3693b2ba0e8f09314c9 (patch)
tree6db4d42ccaa17e1642fba68535bdc0405114ae10
parentf96f223112b7a50336fe153d2e0408caa9ce3390 (diff)
parent0c6d1f7cf2e821f4ffe3a3bf88c57948eea1e569 (diff)
merge
-rw-r--r--indra/newview/lldrawpoolalpha.cpp36
1 files changed, 6 insertions, 30 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 71eee0188c..537f6216c2 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -125,6 +125,9 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
{
simple_shader = &gDeferredAlphaProgram;
fullbright_shader = &gObjectFullbrightProgram;
+
+ //prime simple shader (loads shadow relevant uniforms)
+ gPipeline.bindDeferredShader(*simple_shader);
}
else
{
@@ -290,11 +293,6 @@ void LLDrawPoolAlpha::render(S32 pass)
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- }
-
if (sShowDebugAlpha)
{
if(gPipeline.canUseWindLightShaders())
@@ -411,29 +409,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
if(use_shaders && (current_shader != target_shader))
{
llassert(target_shader != NULL);
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
- }
current_shader = target_shader;
- if (deferred_render)
- {
- gPipeline.bindDeferredShader(*current_shader);
- diffuse_channel = current_shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- }
- else
- {
- current_shader->bind();
- }
+ current_shader->bind();
}
else if (!use_shaders && current_shader != NULL)
{
- if (deferred_render)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- diffuse_channel = 0;
- }
LLGLSLShader::bindNoShader();
current_shader = NULL;
}
@@ -510,12 +490,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
}
}
- if (deferred_render && current_shader != NULL)
- {
- gPipeline.unbindDeferredShader(*current_shader);
- LLVertexBuffer::unbind();
- }
-
+ LLVertexBuffer::unbind();
+
if (!light_enabled)
{
gPipeline.enableLightsDynamic();