From e822ecc8035fe2624270c0c81ace9f74dcc8a8e1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Nov 2011 18:56:25 -0600 Subject: SH-2675 Fix for shadow appearing on terrain at midday when terrain is totally flat and there are no prims visible --- indra/newview/llvosurfacepatch.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvosurfacepatch.cpp') diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 0108690538..c3a2e6a712 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -1035,6 +1035,8 @@ void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newM { LLVector3 posAgent = getPositionAgent(); LLVector3 scale = getScale(); + //make z-axis scale at least 1 to avoid shadow artifacts on totally flat land + scale.mV[VZ] = llmax(scale.mV[VZ], 1.f); newMin.load3( (posAgent-scale*0.5f).mV); // Changing to 2.f makes the culling a -little- better, but still wrong newMax.load3( (posAgent+scale*0.5f).mV); LLVector4a pos; -- cgit v1.2.3