Bumpmapping now appears on hud objects in deferred.

This commit is contained in:
Shyotl
2011-09-02 06:57:15 -05:00
parent 3c4f012480
commit 992319f667
3 changed files with 15 additions and 3 deletions

View File

@@ -400,6 +400,11 @@ void LLSpatialGroup::clearDrawMap()
mDrawMap.clear();
}
BOOL LLSpatialGroup::isHUDGroup()
{
return mSpatialPartition && mSpatialPartition->isHUDPartition() ;
}
BOOL LLSpatialGroup::isRecentlyVisible() const
{
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
@@ -3315,6 +3320,10 @@ void LLSpatialGroup::drawObjectBox(LLColor4 col)
drawBox(mObjectBounds[0], size);
}
bool LLSpatialPartition::isHUDPartition()
{
return mPartitionType == LLViewerRegion::PARTITION_HUD ;
}
BOOL LLSpatialPartition::isVisible(const LLVector3& v)
{

View File

@@ -273,6 +273,7 @@ public:
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
BOOL isHUDGroup() ;
BOOL isDead() { return isState(DEAD); }
BOOL isState(eSpatialState state) const; //Using enum type here and below to force type-safeness.
BOOL isOcclusionState(eOcclusionState state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; }
@@ -438,6 +439,7 @@ public:
S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum
BOOL isVisible(const LLVector3& v);
bool isHUDPartition() ;
virtual LLSpatialBridge* asBridge() { return NULL; }
virtual BOOL isBridge() { return asBridge() != NULL; }

View File

@@ -3911,6 +3911,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
}
bool hud_group = group->isHUDGroup() ;
std::vector<LLFace*>::iterator face_iter = faces.begin();
LLSpatialGroup::buffer_map_t buffer_map;
@@ -4181,7 +4182,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
@@ -4219,7 +4220,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
else if (fullbright)
{ //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);
}
@@ -4245,7 +4246,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);