diff options
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-x | indra/newview/pipeline.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1e66c40e87..4801c52209 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1067,12 +1067,6 @@ void LLPipeline::updateRenderDeferred() { //must render glow when rendering deferred since post effect pass is needed to present any lighting at all sRenderGlow = TRUE; } - - if (LLRenderTarget::sUseFBO && !sRenderDeferred) - { //this case should never happen, but some odd startup state can cause it to - LLRenderTarget::sUseFBO = FALSE; - } - } //static @@ -1205,7 +1199,7 @@ void LLPipeline::releaseLUTBuffers() { if (mLightFunc) { - LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_R8, 0, 1, &mLightFunc); + LLImageGL::deleteTextures(LLTexUnit::TT_TEXTURE, GL_R16F, 0, 1, &mLightFunc); mLightFunc = 0; } } @@ -1712,6 +1706,8 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima return 0; } + LLMaterial* mat = te->getMaterialParams().get(); + bool color_alpha = te->getColor().mV[3] < 0.999f; bool alpha = color_alpha; if (imagep) @@ -1719,9 +1715,9 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2); } - if (alpha && te->getMaterialParams()) + if (alpha && mat) { - switch (te->getMaterialParams()->getDiffuseAlphaMode()) + switch (mat->getDiffuseAlphaMode()) { case 1: alpha = true; // Material's alpha mode is set to blend. Toss it into the alpha draw pool. @@ -1740,10 +1736,11 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima { return LLDrawPool::POOL_ALPHA; } - else if ((te->getBumpmap() || te->getShiny()) && te->getMaterialID().isNull()) + else if ((te->getBumpmap() || te->getShiny()) && (!mat || mat->getNormalID().isNull())) { return LLDrawPool::POOL_BUMP; - } else if (!te->getMaterialID().isNull() && !alpha) + } + else if (mat && !alpha) { return LLDrawPool::POOL_MATERIALS; } @@ -8806,7 +8803,7 @@ void LLPipeline::renderDeferredLighting() gDeferredPostGammaCorrectProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mScreen.getWidth(), mScreen.getHeight()); F32 gamma = 1.0/2.2; - + gDeferredPostGammaCorrectProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, gamma); gGL.begin(LLRender::TRIANGLE_STRIP); @@ -10693,11 +10690,13 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLVector4a left; left.load3(camera.getLeftAxis().mV); left.mul(left); + llassert(left.dot3(left).getF32() > F_APPROXIMATELY_ZERO); left.normalize3fast(); LLVector4a up; up.load3(camera.getUpAxis().mV); up.mul(up); + llassert(up.dot3(up).getF32() > F_APPROXIMATELY_ZERO); up.normalize3fast(); tdim.mV[0] = fabsf(half_height.dot3(left).getF32()); |