summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-08-19 16:50:08 -0400
committerOz Linden <oz@lindenlab.com>2011-08-19 16:50:08 -0400
commit7ffc8b45e2cee4389d3b9f3c20ae213e6430d57b (patch)
tree2095b3a3d55990e7a534fee31226c3caa096c699 /indra/newview/lldrawpoolsimple.cpp
parentf40d2c5afb78f4a17b4753c42f6756dbd76a18c8 (diff)
parent2b40cbb13d03d2e55eb7540f5f59856fb3e6a9cc (diff)
merge changes for storm-1564
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r--indra/newview/lldrawpoolsimple.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 224f149c6b..eec4ee6bac 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -182,7 +182,6 @@ void LLDrawPoolSimple::endRenderPass(S32 pass)
void LLDrawPoolSimple::render(S32 pass)
{
LLGLDisable blend(GL_BLEND);
- LLGLDisable alpha_test(GL_ALPHA_TEST);
{ //render simple
LLFastTimer t(FTM_RENDER_SIMPLE);
@@ -202,6 +201,7 @@ void LLDrawPoolSimple::render(S32 pass)
}
else
{
+ LLGLDisable alpha_test(GL_ALPHA_TEST);
renderTexture(LLRenderPass::PASS_SIMPLE, getVertexDataMask());
}
@@ -256,19 +256,21 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
if (LLPipeline::sUnderWaterRender)
{
- simple_shader = &gObjectSimpleNonIndexedWaterProgram;
+ simple_shader = &gObjectAlphaMaskNonIndexedWaterProgram;
}
else
{
- simple_shader = &gObjectSimpleNonIndexedProgram;
+ simple_shader = &gObjectAlphaMaskNonIndexedProgram;
}
if (mVertexShaderLevel > 0)
{
simple_shader->bind();
+ simple_shader->setAlphaRange(0.5f, 1.f);
}
else
{
+ gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
// don't use shaders!
if (gGLManager.mHasShaderObjects)
{
@@ -286,22 +288,23 @@ void LLDrawPoolGrass::endRenderPass(S32 pass)
{
simple_shader->unbind();
}
+ else
+ {
+ gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
}
void LLDrawPoolGrass::render(S32 pass)
{
LLGLDisable blend(GL_BLEND);
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
-
+
{
LLFastTimer t(FTM_RENDER_GRASS);
LLGLEnable test(GL_ALPHA_TEST);
gGL.setSceneBlendType(LLRender::BT_ALPHA);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
- }
-
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
+ }
}
void LLDrawPoolGrass::beginDeferredPass(S32 pass)
@@ -316,17 +319,13 @@ void LLDrawPoolGrass::endDeferredPass(S32 pass)
void LLDrawPoolGrass::renderDeferred(S32 pass)
{
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
-
{
LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
- gDeferredTreeProgram.bind();
- LLGLEnable test(GL_ALPHA_TEST);
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.setAlphaRange(0.5f, 1.f);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
}
-
- gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
}