Added RenderAutoHideSurfaceAreaLimit setting, and tweaked hud rendering(lighting issues)

This commit is contained in:
Shyotl
2012-06-12 02:10:22 -05:00
parent 0286c8bf55
commit 5b4700a8ee
4 changed files with 12 additions and 3 deletions

View File

@@ -1077,6 +1077,7 @@ void LLSpatialGroup::clearOcclusionState(eOcclusionState state, S32 mode)
//======================================
LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
mObjectBoxSize(1.f),
mState(0),
mGeometryBytes(0),
mSurfaceArea(0.f),

View File

@@ -363,6 +363,8 @@ public:
LLVector4a mViewAngle;
LLVector4a mLastUpdateViewAngle;
F32 mObjectBoxSize; //cached mObjectBounds[1].getLength3()
protected:
virtual ~LLSpatialGroup();

View File

@@ -3383,6 +3383,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
group->mGeometryBytes = 0;
group->mSurfaceArea = 0;
//cache object box size since it might be used for determining visibility
group->mObjectBoxSize = group->mObjectBounds[1].getLength3().getF32();
group->clearDrawMap();
mFaceList.clear();
@@ -4247,7 +4250,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
}
}
else if (gPipeline.canUseVertexShaders()
&& group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD
&& LLPipeline::sRenderBump
&& te->getShiny())
{ //shiny

View File

@@ -3203,8 +3203,12 @@ void LLPipeline::postSort(LLCamera& camera)
for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
{
LLSpatialGroup* group = *i;
static LLCachedControl<F32> RenderAutoHideSurfaceAreaLimit("RenderAutoHideSurfaceAreaLimit", 0.f);
if (sUseOcclusion &&
group->isOcclusionState(LLSpatialGroup::OCCLUDED))
group->isOcclusionState(LLSpatialGroup::OCCLUDED) ||
(RenderAutoHideSurfaceAreaLimit > 0.f &&
group->mSurfaceArea > RenderAutoHideSurfaceAreaLimit*llmax(group->mObjectBoxSize, 10.f)))
{
continue;
}
@@ -3275,7 +3279,7 @@ void LLPipeline::postSort(LLCamera& camera)
}
llpushcallstacks ;
forAllVisibleDrawables(updateParticleActivity);
forAllVisibleDrawables(updateParticleActivity); //for llfloateravatarlist
// only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
static const LLCachedControl<bool> beacons_visible("BeaconsVisible", false);