diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-05-22 07:06:22 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-22 07:06:22 -0700 |
commit | 03eb406d05e6d53c202c26e564c104bcf4bef4d1 (patch) | |
tree | 7aeb6b357a1695b3f08d3bfdec4a948b3f38124f /indra/newview | |
parent | 8b7a4c503c1a64480cdd411012cae94880bf143f (diff) |
NORSPEC-203 fix handling of objs with materials due to alpha mode in non-deferred
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvovolume.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index caf4fe9383..ca7849fdad 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5368,6 +5368,28 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: registerFace(group, facep, pass[mask]); } } + else if (mat) + { + if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK : LLRenderPass::PASS_ALPHA_MASK); + } + else if (is_alpha || (te->getColor().mV[3] < 0.999f)) + { + registerFace(group, facep, LLRenderPass::PASS_ALPHA); + } + else if (gPipeline.canUseVertexShaders() + && LLPipeline::sRenderBump + && te->getShiny() + && can_be_shiny) + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT_SHINY : LLRenderPass::PASS_SHINY); + } + else + { + registerFace(group, facep, fullbright ? LLRenderPass::PASS_FULLBRIGHT : LLRenderPass::PASS_SIMPLE); + } + } else if (is_alpha) { // can we safely treat this as an alpha mask? |