diff options
author | skolb <none@none> | 2009-12-11 12:36:46 -0800 |
---|---|---|
committer | skolb <none@none> | 2009-12-11 12:36:46 -0800 |
commit | f51bf5d618614d5d6589ccc0fc27dc71cc33c259 (patch) | |
tree | 70a3c809772c81388cc568f866f52e6a2eb7d47e /indra/newview/llvovolume.cpp | |
parent | 6245ae0baca27e269982fc38309eb122678bd788 (diff) | |
parent | b303dbb086462271e8e4b16eabb699921c647647 (diff) |
Merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b92d024ac9..08e12f4ad9 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2614,7 +2614,22 @@ const LLMatrix4 LLVOVolume::getRenderMatrix() const // children, and cost should only be increased for unique textures -Nyx U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const { - U32 shame = 0; + // base cost of each prim should be 10 points + static const U32 ARC_PRIM_COST = 10; + // per-prim costs + static const U32 ARC_INVISI_COST = 1; + static const U32 ARC_SHINY_COST = 1; + static const U32 ARC_GLOW_COST = 1; + static const U32 ARC_FLEXI_COST = 8; + static const U32 ARC_PARTICLE_COST = 16; + static const U32 ARC_BUMP_COST = 4; + + // per-face costs + static const U32 ARC_PLANAR_COST = 1; + static const U32 ARC_ANIM_TEX_COST = 4; + static const U32 ARC_ALPHA_COST = 4; + + U32 shame = ARC_PRIM_COST; U32 invisi = 0; U32 shiny = 0; @@ -2690,7 +2705,17 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const } } - shame += invisi + shiny + glow + alpha*4 + flexi*8 + animtex*4 + particles*16+bump*4+scale+planar; + + shame += invisi * ARC_INVISI_COST; + shame += shiny * ARC_SHINY_COST; + shame += glow * ARC_GLOW_COST; + shame += alpha * ARC_ALPHA_COST; + shame += flexi * ARC_FLEXI_COST; + shame += animtex * ARC_ANIM_TEX_COST; + shame += particles * ARC_PARTICLE_COST; + shame += bump * ARC_BUMP_COST; + shame += planar * ARC_PLANAR_COST; + shame += scale; LLViewerObject::const_child_list_t& child_list = getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); |