summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.cpp
diff options
context:
space:
mode:
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);
}