- adjust light radius to match what gzdoom does

This commit is contained in:
Magnus Norddahl 2018-10-31 20:14:30 +01:00
parent 8b290752c6
commit d95a8707cc
2 changed files with 2 additions and 2 deletions

View file

@ -280,7 +280,7 @@ kexVec3 kexLightmapBuilder::LightTexelSample(kexTrace &trace, const kexVec3 &ori
continue;
}
float radius = tl->radius;
float radius = tl->radius * 2.0f; // 2.0 because gzdoom's dynlights do this and we want them to match
float intensity = tl->intensity;
if(origin.DistanceSq(lightOrigin) > (radius*radius))

View file

@ -414,7 +414,7 @@ bool kexLightSurface::TraceSurface(FLevel *doomMap, kexTrace &trace, const surfa
float d = origin.Distance(center);
curDist = 1.0f - d / distance;
curDist = 1.0f - d / (distance * 2.0f); // 2.0 because gzdoom's dynlights do this and we want them to match
if (curDist < 0.0f) curDist = 0.0f;
if(curDist >= 1)