summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpooltree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpooltree.cpp')
-rw-r--r--indra/newview/lldrawpooltree.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index b1f40781f7..0d5195bdbf 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -38,6 +38,7 @@
#include "llrender.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
+#include "llenvironment.h"
S32 LLDrawPoolTree::sDiffTex = 0;
static LLGLSLShader* shader = NULL;
@@ -50,14 +51,9 @@ LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
mTexturep->setAddressMode(LLTexUnit::TAM_WRAP);
}
-LLDrawPool *LLDrawPoolTree::instancePool()
-{
- return new LLDrawPoolTree(mTexturep);
-}
-
void LLDrawPoolTree::prerender()
{
- mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
+ mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
}
void LLDrawPoolTree::beginRenderPass(S32 pass)
@@ -96,7 +92,6 @@ void LLDrawPoolTree::render(S32 pass)
}
LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
- LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
gGL.getTexUnit(sDiffTex)->bind(mTexturep);
@@ -138,7 +133,7 @@ void LLDrawPoolTree::endRenderPass(S32 pass)
shader->unbind();
}
- if (mVertexShaderLevel <= 0)
+ if (mShaderLevel <= 0)
{
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}
@@ -178,7 +173,10 @@ void LLDrawPoolTree::beginShadowPass(S32 pass)
glPolygonOffset(gSavedSettings.getF32("RenderDeferredTreeShadowOffset"),
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
+ LLEnvironment& environment = LLEnvironment::instance();
+
gDeferredTreeShadowProgram.bind();
+ gDeferredTreeShadowProgram.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0);
gDeferredTreeShadowProgram.setMinimumAlpha(0.5f);
}