diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-31 14:35:41 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-31 14:35:41 -0400 |
commit | 822d521e46d70359985e4d6e8ccb34766492a980 (patch) | |
tree | 4f9aefc823d6e6840cf6ec55561a502261c4ca93 /indra/newview/lldrawpoolsimple.cpp | |
parent | e58d50e509d060320174c80af647da6ff9a3839f (diff) | |
parent | 5e5869c63a05e3d773fc4d19deaff171efa5014c (diff) |
merge
Diffstat (limited to 'indra/newview/lldrawpoolsimple.cpp')
-rw-r--r-- | indra/newview/lldrawpoolsimple.cpp | 27 |
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); } |