summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolalpha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-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();