From 55ed12f8d1eb6887d348be03aee5573d44177ffb Mon Sep 17 00:00:00 2001 From: Michael Sartain Date: Thu, 2 Oct 2014 08:25:55 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- mp/src/utils/vrad/vraddetailprops.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mp/src/utils/vrad/vraddetailprops.cpp') diff --git a/mp/src/utils/vrad/vraddetailprops.cpp b/mp/src/utils/vrad/vraddetailprops.cpp index 93232595..c782ca29 100644 --- a/mp/src/utils/vrad/vraddetailprops.cpp +++ b/mp/src/utils/vrad/vraddetailprops.cpp @@ -738,7 +738,9 @@ void ComputeIndirectLightingAtPoint( Vector &position, Vector &normal, Vector &o ColorRGBExp32ToVector( *pLightmap, lightmapColor ); } - VectorMultiply( lightmapColor, dtexdata[pTex->texdata].reflectivity, lightmapColor ); + float invLengthSqr = 1.0f / (1.0f + ((vEnd - position) * surfEnum.m_HitFrac / 128.0).LengthSqr()); + // Include falloff using invsqrlaw. + VectorMultiply( lightmapColor, invLengthSqr * dtexdata[pTex->texdata].reflectivity, lightmapColor ); VectorAdd( outColor, lightmapColor, outColor ); } -- cgit v1.2.3