diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-09-07 13:58:19 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-09-07 13:58:19 -0700 |
commit | 78821c51a1f7d5fcc6e4a2678bfd3446ccfaee36 (patch) | |
tree | 51da53114f257ca57c2aa36da655019b75cf0269 /indra/newview/lldrawpoolsimple.cpp | |
parent | c64bd7d5cb28fc221716e866ff9c9a28c22e69ce (diff) | |
parent | fef401a1768bae9bfb23a13549fa3a5005f2c7ae (diff) |
Merge from viewer-experience
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); } |