- fix misc light surfaces not working outside their own subsector

This commit is contained in:
Magnus Norddahl 2018-10-30 00:59:10 +01:00
parent 8958790fed
commit 6459b10724
3 changed files with 4 additions and 5 deletions

View file

@ -509,6 +509,7 @@ void kexLightmapBuilder::TraceSurface(surface_t *surface)
(surface->lightmapSteps[1] * (float)i); (surface->lightmapSteps[1] * (float)i);
kexVec3 c = LightTexelSample(trace, pos, surface); kexVec3 c = LightTexelSample(trace, pos, surface);
kexMath::Clamp(c, 0, 1);
// if nothing at all was traced and color is completely black // if nothing at all was traced and color is completely black
// then this surface will not go through the extra rendering // then this surface will not go through the extra rendering

View file

@ -417,7 +417,6 @@ bool kexLightSurface::TraceSurface(FLevel *doomMap, kexTrace &trace, const surfa
curDist = 1.0f - d / distance; curDist = 1.0f - d / distance;
if (curDist < 0.0f) curDist = 0.0f; if (curDist < 0.0f) curDist = 0.0f;
/*
if(curDist >= 1) if(curDist >= 1)
{ {
curDist = 1; curDist = 1;
@ -445,7 +444,6 @@ bool kexLightSurface::TraceSurface(FLevel *doomMap, kexTrace &trace, const surfa
curDist *= angle; curDist *= angle;
} }
} }
*/
if(curDist > *dist) if(curDist > *dist)
{ {

View file

@ -564,11 +564,11 @@ void FLevel::ParseConfigFile(const char *file)
surfaceLightDef surfaceLight; surfaceLightDef surfaceLight;
surfaceLight.tag = 0; surfaceLight.tag = 0;
surfaceLight.outerCone = 1.0f; surfaceLight.outerCone = 0.0f;
surfaceLight.innerCone = 0; surfaceLight.innerCone = 0.0f;
surfaceLight.falloff = 1.0f; surfaceLight.falloff = 1.0f;
surfaceLight.intensity = 1.0f; surfaceLight.intensity = 1.0f;
surfaceLight.distance = 1000.0f; surfaceLight.distance = 400.0f;
surfaceLight.bIgnoreCeiling = false; surfaceLight.bIgnoreCeiling = false;
surfaceLight.bIgnoreFloor = false; surfaceLight.bIgnoreFloor = false;
surfaceLight.bNoCenterPoint = false; surfaceLight.bNoCenterPoint = false;