diff options
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 6c073a8e20..324d3de499 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1995,7 +1995,6 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co { if (getTE(i)->getMaterialID() == pMaterialID) { - LL_INFOS("Materials") << "Material params callback triggered!" << LL_ENDL; setTEMaterialParams(i, pMaterialParams); } } @@ -2005,13 +2004,10 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) { if (!pMaterialID.isNull()) { - LL_INFOS("Materials") << "Oh god it's a material! " << pMaterialID.asString() << LL_ENDL; S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID); if (res) { - LL_INFOS("Materials") << "We have a material!" << LL_ENDL; LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2)); - //setTEMaterialParams(te, pMatParam); gPipeline.markTextured(mDrawable); mFaceMappingChanged = TRUE; } @@ -5215,10 +5211,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: registerFace(group, facep, LLRenderPass::PASS_POST_BUMP); } } - else if (te->getBumpmap() || te->getMaterialParams() != NULL) + else if (te->getBumpmap() && !te->getMaterialParams()) { //register in deferred bump pass registerFace(group, facep, LLRenderPass::PASS_BUMP); } + else if (te->getMaterialParams()) + { + registerFace(group, facep, LLRenderPass::PASS_MATERIALS); + } else { //register in deferred simple pass (deferred simple includes shiny) llassert(mask & LLVertexBuffer::MAP_NORMAL); @@ -5250,10 +5250,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } else { - if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && (te->getBumpmap() || te->getMaterialParams())) + if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && (te->getBumpmap() && !te->getMaterialParams())) { //non-shiny or fullbright deferred bump registerFace(group, facep, LLRenderPass::PASS_BUMP); } + else if (te->getMaterialParams()) + { + registerFace(group, facep, LLRenderPass::PASS_MATERIALS); + } else { //all around simple llassert(mask & LLVertexBuffer::MAP_NORMAL); |