diff options
author | Dave Parks <davep@lindenlab.com> | 2013-03-29 20:12:27 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-03-29 20:12:27 -0500 |
commit | 14f02e48b877569539c96ef5f261ac8b3943579f (patch) | |
tree | 382802d341977dc87f452804ba53062dc4f76c01 /indra/newview/llvovolume.cpp | |
parent | fc4869fb7871632b95dd293157b9965fb2edcb73 (diff) |
NORSPEC-66 Hook up material parameters to rigged attachments.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 98 |
1 files changed, 64 insertions, 34 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index df462e5013..9d5f2f9233 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4463,66 +4463,96 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) LLViewerTexture* tex = facep->getTexture(); U32 type = gPipeline.getPoolTypeFromTE(te, tex); - if (type == LLDrawPool::POOL_ALPHA) + + if (te->getGlow()) { - if (te->getColor().mV[3] > 0.f) + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_GLOW); + } + + LLMaterial* mat = te->getMaterialParams().get(); + + if (mat) + { + if (te->getFullbright()) { - if (te->getFullbright()) + if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) { pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA); } - else + else if (type == LLDrawPool::POOL_ALPHA) { pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA); } + else + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT); + } + } + else + { + U32 mask = mat->getShaderMask(); + pool->addRiggedFace(facep, mask); } } - else if (te->getShiny()) + else { - if (te->getFullbright()) + if (type == LLDrawPool::POOL_ALPHA) { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY); + if (te->getColor().mV[3] > 0.f) + { + if (te->getFullbright()) + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA); + } + else + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA); + } + } } - else + else if (te->getShiny()) { - if (LLPipeline::sRenderDeferred) + if (te->getFullbright()) { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE); + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY); } else { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY); + if (LLPipeline::sRenderDeferred) + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE); + } + else + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY); + } } } - } - else - { - if (te->getFullbright()) - { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT); - } else { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE); - } - } - - if (te->getGlow()) - { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_GLOW); - } - - if (LLPipeline::sRenderDeferred) - { - if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright()) - { - if (te->getBumpmap()) + if (te->getFullbright()) { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP); + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT); } else { - pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE); + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE); + } + } + + + if (LLPipeline::sRenderDeferred) + { + if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright()) + { + if (te->getBumpmap()) + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP); + } + else + { + pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE); + } } } } |