mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-02-03 13:11:04 +00:00
- adjust light radius to match what gzdoom does
This commit is contained in:
parent
8b290752c6
commit
d95a8707cc
2 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue