summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-15 02:41:14 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-15 02:41:14 +0200
commitffccd4a2ecdebba16a2fc06f84f04fb85389f24f (patch)
tree7dd6777b299afccf30f65cafc8d306de5b05bc46 /indra
parent71269ac1fc4ab19d46fd33c82b1df7a887b918bc (diff)
Backed out changeset: f73be0eb9d00
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llviewercamera.cpp10
-rw-r--r--indra/newview/llviewercamera.h3
-rw-r--r--indra/newview/llvovolume.cpp19
-rw-r--r--indra/newview/llvovolume.h2
-rw-r--r--indra/newview/pipeline.cpp7
-rw-r--r--indra/newview/pipeline.h2
7 files changed, 11 insertions, 43 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 04fb1fb238..9f37c3487e 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4636,17 +4636,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>IgnoreFOVZoomForLODs</key>
- <map>
- <key>Comment</key>
- <string>Ignore zoom effect(CTRL+0) when calculating lods.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>IgnoreAllNotifications</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index 778e275727..57a0195d23 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -113,7 +113,6 @@ LLViewerCamera::LLViewerCamera() : LLCamera()
{
calcProjection(getFar());
mCameraFOVDefault = DEFAULT_FIELD_OF_VIEW;
- mPrevCameraFOVDefault = DEFAULT_FIELD_OF_VIEW;
mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f);
mPixelMeterRatio = 0.f;
mScreenPixelArea = 0;
@@ -883,15 +882,6 @@ void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads)
mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f);
}
-BOOL LLViewerCamera::isDefaultFOVChanged()
-{
- if(mPrevCameraFOVDefault != mCameraFOVDefault)
- {
- mPrevCameraFOVDefault = mCameraFOVDefault;
- return !gSavedSettings.getBOOL("IgnoreFOVZoomForLODs");
- }
- return FALSE;
-}
// static
void LLViewerCamera::updateCameraAngle( void* user_data, const LLSD& value)
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index 5901de289f..f8c973690a 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -115,8 +115,6 @@ public:
void setDefaultFOV(F32 fov) ;
F32 getDefaultFOV() { return mCameraFOVDefault; }
- BOOL isDefaultFOVChanged();
-
BOOL cameraUnderWater() const;
BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts);
@@ -140,7 +138,6 @@ protected:
mutable LLMatrix4 mProjectionMatrix; // Cache of perspective matrix
mutable LLMatrix4 mModelviewMatrix;
F32 mCameraFOVDefault;
- F32 mPrevCameraFOVDefault;
F32 mCosHalfCameraFOV;
LLVector3 mLastPointOfInterest;
F32 mPixelMeterRatio; // Divide by distance from camera to get pixels per meter at that distance.
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 217b8bfbc2..657babd92c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1214,18 +1214,18 @@ void LLVOVolume::sculpt()
}
}
-S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius, F32 lod_factor)
+S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius)
{
S32 cur_detail;
if (LLPipeline::sDynamicLOD)
{
// We've got LOD in the profile, and in the twist. Use radius.
- F32 tan_angle = (lod_factor*radius)/distance;
+ F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance;
cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f));
}
else
{
- cur_detail = llclamp((S32) (sqrtf(radius)*lod_factor*4.f), 0, 3);
+ cur_detail = llclamp((S32) (sqrtf(radius)*LLVOVolume::sLODFactor*4.f), 0, 3);
}
return cur_detail;
}
@@ -1241,7 +1241,6 @@ BOOL LLVOVolume::calcLOD()
F32 radius;
F32 distance;
- F32 lod_factor = LLVOVolume::sLODFactor;
if (mDrawable->isState(LLDrawable::RIGGED))
{
@@ -1277,18 +1276,12 @@ BOOL LLVOVolume::calcLOD()
distance *= rampDist;
}
-
+ // DON'T Compensate for field of view changing on FOV zoom.
distance *= F_PI/3.f;
- static LLCachedControl<bool> ignore_fov_zoom(gSavedSettings,"IgnoreFOVZoomForLODs");
- if(!ignore_fov_zoom)
- {
- lod_factor *= DEFAULT_FIELD_OF_VIEW / LLViewerCamera::getInstance()->getDefaultFOV();
- }
-
cur_detail = computeLODDetail(ll_round(distance, 0.01f),
- ll_round(radius, 0.01f),
- lod_factor);
+ ll_round(radius, 0.01f));
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) &&
mDrawable->getFace(0))
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 3b68d61ee9..a331908320 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -327,7 +327,7 @@ public:
void clearRiggedVolume();
protected:
- S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor);
+ S32 computeLODDetail(F32 distance, F32 radius);
BOOL calcLOD();
LLFace* addFace(S32 face_index);
void updateTEData();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 32285d2784..7c019dc3ea 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3424,7 +3424,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
{
LLSpatialGroup* last_group = NULL;
- BOOL fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged();
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
{
LLCullResult::bridge_iterator cur_iter = i;
@@ -3438,7 +3437,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
if (!bridge->isDead() && group && !group->isOcclusionState(LLSpatialGroup::OCCLUDED))
{
- stateSort(bridge, camera, fov_changed);
+ stateSort(bridge, camera);
}
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD &&
@@ -3510,9 +3509,9 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
}
-void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed)
+void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
{
- if (bridge->getSpatialGroup()->changeLOD() || fov_changed)
+ if (bridge->getSpatialGroup()->changeLOD())
{
bool force_update = false;
bridge->updateDistance(camera, force_update);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 5ddb4e0f01..bba36351d9 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -254,7 +254,7 @@ public:
void stateSort(LLCamera& camera, LLCullResult& result);
void stateSort(LLSpatialGroup* group, LLCamera& camera);
- void stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed = FALSE);
+ void stateSort(LLSpatialBridge* bridge, LLCamera& camera);
void stateSort(LLDrawable* drawablep, LLCamera& camera);
void postSort(LLCamera& camera);
void forAllVisibleDrawables(void (*func)(LLDrawable*));