diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 23660dd3ce4bc3ab61bc86aeaa92074e4185bb4d..cbce2674a712d8477725dfe0a54e7c2825c9edcd 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1071,6 +1071,8 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
 	const U32 cur_frame = LLViewerOctreeEntryData::getCurrentFrame();
 	bool needs_update = ((cur_frame - mImpl->mLastCameraUpdate) > 5) && ((camera_origin - mImpl->mLastCameraOrigin).lengthSquared() > 10.f);	
 	U32 last_update = mImpl->mLastCameraUpdate;
+	LLVector4a local_origin;
+	local_origin.load3((camera_origin - getOriginAgent()).mV);
 
 	//process visible entries
 	for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
@@ -1149,7 +1151,7 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
 					continue;
 				}
 
-				vo_entry->calcSceneContribution(camera_origin, needs_update, last_update);				
+				vo_entry->calcSceneContribution(local_origin, needs_update, last_update);				
 				mImpl->mWaitingList.insert(vo_entry);			
 			}
 		}
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 72270eec4677ffcb3111f8af87a37aabe94ad2b6..b1c7423b49ff9d81f544545933e448316a1b7de8 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -383,20 +383,15 @@ bool LLVOCacheEntry::isRecentlyVisible() const
 	return vis;
 }
 
-void LLVOCacheEntry::calcSceneContribution(const LLVector3& camera_origin, bool needs_update, U32 last_update)
+void LLVOCacheEntry::calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update)
 {
 	if(!needs_update && getVisible() >= last_update)
 	{
 		return; //no need to update
 	}
 
-	const LLVector4a& center = getPositionGroup();
-	
-	LLVector4a origin;
-	origin.load3(camera_origin.mV);
-
 	LLVector4a lookAt;
-	lookAt.setSub(center, origin);
+	lookAt.setSub(getPositionGroup(), camera_origin);
 	F32 squared_dist = lookAt.dot3(lookAt).getF32();
 
 	if(squared_dist > 0.f)
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index 3ee9dcaac8cb6769d12fe3664947bef7ee931acb..446111620d8af5c22690aec5a6698544389f65c2 100755
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -93,7 +93,7 @@ class LLVOCacheEntry
 	S32 getHitCount() const			{ return mHitCount; }
 	S32 getCRCChangeCount() const	{ return mCRCChangeCount; }
 	
-	void calcSceneContribution(const LLVector3& camera_origin, bool needs_update, U32 last_update);
+	void calcSceneContribution(const LLVector4a& camera_origin, bool needs_update, U32 last_update);
 	void setSceneContribution(F32 scene_contrib) {mSceneContrib = scene_contrib;}
 	F32 getSceneContribution() const             { return mSceneContrib;}