From f3130b85e6ddbff7b0ce700c52d3eb54d9c98b71 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 28 Jul 2011 17:51:00 -0600 Subject: fix for SH-2023: Brightness Bump maps don't load when shadows are enabled --- indra/newview/llvovolume.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 4c137d3394..d8b02fab27 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -704,19 +704,22 @@ BOOL LLVOVolume::isVisible() const return FALSE ; } -void LLVOVolume::updateTextureVirtualSize() +void LLVOVolume::updateTextureVirtualSize(bool forced) { LLFastTimer ftm(FTM_VOLUME_TEXTURES); // Update the pixel area of all faces - if(!isVisible()) + if(!forced) { - return ; - } + if(!isVisible()) + { + return ; + } - if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE)) - { - return; + if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SIMPLE)) + { + return; + } } static LLCachedControl dont_load_textures(gSavedSettings,"TextureDisable"); @@ -3995,7 +3998,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } llassert_always(vobj); - vobj->updateTextureVirtualSize(); + vobj->updateTextureVirtualSize(true); vobj->preRebuild(); drawablep->clearState(LLDrawable::HAS_ALPHA); -- cgit v1.2.3 From dfcc0849495d40459bce60d4eb754128d6ea53db Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 17 Aug 2011 15:16:02 -0600 Subject: fix for SH-1142: HUD objects do not display bumpmaps when Lighting and Shadows are enabled. --- indra/newview/llvovolume.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index eb3ed3c379..528c7acbc8 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4490,6 +4490,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater()); } + bool hud_group = group->isHUDGroup() ; std::vector::iterator face_iter = faces.begin(); LLSpatialGroup::buffer_map_t buffer_map; @@ -4760,7 +4761,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: registerFace(group, facep, LLRenderPass::PASS_INVISI_SHINY); registerFace(group, facep, LLRenderPass::PASS_INVISIBLE); } - else if (LLPipeline::sRenderDeferred) + else if (LLPipeline::sRenderDeferred && !hud_group) { //deferred rendering if (te->getFullbright()) { //register in post deferred fullbright shiny pass @@ -4798,7 +4799,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: else if (fullbright || bake_sunlight) { //fullbright registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); - if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && te->getBumpmap()) + if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && te->getBumpmap()) { //if this is the deferred render and a bump map is present, register in post deferred bump registerFace(group, facep, LLRenderPass::PASS_POST_BUMP); } @@ -4824,7 +4825,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } //not sure why this is here, and looks like it might cause bump mapped objects to get rendered redundantly -- davep 5/11/2010 - if (!is_alpha && !LLPipeline::sRenderDeferred) + if (!is_alpha && (hud_group || !LLPipeline::sRenderDeferred)) { llassert((mask & LLVertexBuffer::MAP_NORMAL) || fullbright); facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE); -- cgit v1.2.3