diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvovolume.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 46af322..6baff85 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -68,8 +68,7 @@ | |||
68 | const S32 MIN_QUIET_FRAMES_COALESCE = 30; | 68 | const S32 MIN_QUIET_FRAMES_COALESCE = 30; |
69 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; | 69 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; |
70 | const F32 FORCE_CULL_AREA = 8.f; | 70 | const F32 FORCE_CULL_AREA = 8.f; |
71 | // sadly - we can't lower sculptie rez below b/c residents have a LOT of content that depends on the 128 | 71 | const S32 MAX_SCULPT_REZ = 128; |
72 | const S32 SCULPT_REZ = 128; | ||
73 | 72 | ||
74 | BOOL gAnimateTextures = TRUE; | 73 | BOOL gAnimateTextures = TRUE; |
75 | extern BOOL gHideSelectedObjects; | 74 | extern BOOL gHideSelectedObjects; |
@@ -498,6 +497,7 @@ void LLVOVolume::updateTextures() | |||
498 | else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) | 497 | else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) |
499 | { | 498 | { |
500 | F32 pri = imagep->getDecodePriority(); | 499 | F32 pri = imagep->getDecodePriority(); |
500 | pri = llmax(pri, 0.0f); | ||
501 | if (pri < min_vsize) min_vsize = pri; | 501 | if (pri < min_vsize) min_vsize = pri; |
502 | if (pri > max_vsize) max_vsize = pri; | 502 | if (pri > max_vsize) max_vsize = pri; |
503 | } | 503 | } |
@@ -516,7 +516,10 @@ void LLVOVolume::updateTextures() | |||
516 | mSculptTexture = gImageList.getImage(id); | 516 | mSculptTexture = gImageList.getImage(id); |
517 | if (mSculptTexture.notNull()) | 517 | if (mSculptTexture.notNull()) |
518 | { | 518 | { |
519 | mSculptTexture->addTextureStats(SCULPT_REZ * SCULPT_REZ); | 519 | S32 lod = llmin(mLOD, 3); |
520 | F32 lodf = ((F32)(4-lod)/4.f); // 0 -> 1.0, 3 -> .25 | ||
521 | F32 tex_size = lodf * MAX_SCULPT_REZ; | ||
522 | mSculptTexture->addTextureStats(2.f * tex_size * tex_size); | ||
520 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), | 523 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), |
521 | (S32)LLViewerImage::BOOST_SCULPTED)); | 524 | (S32)LLViewerImage::BOOST_SCULPTED)); |
522 | } | 525 | } |
@@ -1946,6 +1949,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
1946 | return FALSE; | 1949 | return FALSE; |
1947 | } | 1950 | } |
1948 | 1951 | ||
1952 | BOOL ret = FALSE; | ||
1953 | |||
1949 | LLVolume* volume = getVolume(); | 1954 | LLVolume* volume = getVolume(); |
1950 | if (volume) | 1955 | if (volume) |
1951 | { | 1956 | { |
@@ -2001,6 +2006,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
2001 | if (face_hit >= 0 && mDrawable->getNumFaces() > face_hit) | 2006 | if (face_hit >= 0 && mDrawable->getNumFaces() > face_hit) |
2002 | { | 2007 | { |
2003 | LLFace* face = mDrawable->getFace(face_hit); | 2008 | LLFace* face = mDrawable->getFace(face_hit); |
2009 | v_end = p; | ||
2010 | |||
2004 | if (pick_transparent || !face->getTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))) | 2011 | if (pick_transparent || !face->getTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n))) |
2005 | { | 2012 | { |
2006 | if (face_hitp != NULL) | 2013 | if (face_hitp != NULL) |
@@ -2030,13 +2037,13 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
2030 | *tex_coord = tc; | 2037 | *tex_coord = tc; |
2031 | } | 2038 | } |
2032 | 2039 | ||
2033 | return TRUE; | 2040 | ret = TRUE; |
2034 | } | 2041 | } |
2035 | } | 2042 | } |
2036 | } | 2043 | } |
2037 | } | 2044 | } |
2038 | 2045 | ||
2039 | return FALSE; | 2046 | return ret; |
2040 | } | 2047 | } |
2041 | 2048 | ||
2042 | U32 LLVOVolume::getPartitionType() const | 2049 | U32 LLVOVolume::getPartitionType() const |