Bumpmapping now appears on hud objects in deferred.
This commit is contained in:
@@ -400,6 +400,11 @@ void LLSpatialGroup::clearDrawMap()
|
|||||||
mDrawMap.clear();
|
mDrawMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL LLSpatialGroup::isHUDGroup()
|
||||||
|
{
|
||||||
|
return mSpatialPartition && mSpatialPartition->isHUDPartition() ;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLSpatialGroup::isRecentlyVisible() const
|
BOOL LLSpatialGroup::isRecentlyVisible() const
|
||||||
{
|
{
|
||||||
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
|
return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < LLDrawable::getMinVisFrameRange() ;
|
||||||
@@ -3315,6 +3320,10 @@ void LLSpatialGroup::drawObjectBox(LLColor4 col)
|
|||||||
drawBox(mObjectBounds[0], size);
|
drawBox(mObjectBounds[0], size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLSpatialPartition::isHUDPartition()
|
||||||
|
{
|
||||||
|
return mPartitionType == LLViewerRegion::PARTITION_HUD ;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLSpatialPartition::isVisible(const LLVector3& v)
|
BOOL LLSpatialPartition::isVisible(const LLVector3& v)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ public:
|
|||||||
|
|
||||||
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
|
LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part);
|
||||||
|
|
||||||
|
BOOL isHUDGroup() ;
|
||||||
BOOL isDead() { return isState(DEAD); }
|
BOOL isDead() { return isState(DEAD); }
|
||||||
BOOL isState(eSpatialState state) const; //Using enum type here and below to force type-safeness.
|
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; }
|
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
|
S32 cull(LLCamera &camera, std::vector<LLDrawable *>* results = NULL, BOOL for_select = FALSE); // Cull on arbitrary frustum
|
||||||
|
|
||||||
BOOL isVisible(const LLVector3& v);
|
BOOL isVisible(const LLVector3& v);
|
||||||
|
bool isHUDPartition() ;
|
||||||
|
|
||||||
virtual LLSpatialBridge* asBridge() { return NULL; }
|
virtual LLSpatialBridge* asBridge() { return NULL; }
|
||||||
virtual BOOL isBridge() { return asBridge() != NULL; }
|
virtual BOOL isBridge() { return asBridge() != NULL; }
|
||||||
|
|||||||
@@ -3911,6 +3911,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
|||||||
std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
|
std::sort(faces.begin(), faces.end(), LLFace::CompareDistanceGreater());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hud_group = group->isHUDGroup() ;
|
||||||
std::vector<LLFace*>::iterator face_iter = faces.begin();
|
std::vector<LLFace*>::iterator face_iter = faces.begin();
|
||||||
|
|
||||||
LLSpatialGroup::buffer_map_t buffer_map;
|
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_INVISI_SHINY);
|
||||||
registerFace(group, facep, LLRenderPass::PASS_INVISIBLE);
|
registerFace(group, facep, LLRenderPass::PASS_INVISIBLE);
|
||||||
}
|
}
|
||||||
else if (LLPipeline::sRenderDeferred)
|
else if (LLPipeline::sRenderDeferred && !hud_group)
|
||||||
{ //deferred rendering
|
{ //deferred rendering
|
||||||
if (te->getFullbright())
|
if (te->getFullbright())
|
||||||
{ //register in post deferred fullbright shiny pass
|
{ //register in post deferred fullbright shiny pass
|
||||||
@@ -4219,7 +4220,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
|||||||
else if (fullbright)
|
else if (fullbright)
|
||||||
{ //fullbright
|
{ //fullbright
|
||||||
registerFace(group, facep, LLRenderPass::PASS_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
|
{ //if this is the deferred render and a bump map is present, register in post deferred bump
|
||||||
registerFace(group, facep, LLRenderPass::PASS_POST_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
|
//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);
|
llassert((mask & LLVertexBuffer::MAP_NORMAL) || fullbright);
|
||||||
facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE);
|
facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user