Remove PVS lighting stage
This commit is contained in:
parent
db0a70607d
commit
ccd1c6ef82
|
@ -477,13 +477,9 @@ public class LightMapper
|
|||
|
||||
private void SetCellLightIndices(Settings settings)
|
||||
{
|
||||
// TODO: Doors aren't blocking lights. Need to do some cell traversal to remove light indices :(
|
||||
|
||||
if (!_mission.TryGetChunk<WorldRep>("WREXT", out var worldRep))
|
||||
return;
|
||||
|
||||
var lightVisibleCells = Timing.TimeStage("Light PVS", () =>
|
||||
{
|
||||
var cellCount = worldRep.Cells.Length;
|
||||
var aabbs = new MathUtils.Aabb[worldRep.Cells.Length];
|
||||
Parallel.For(0, cellCount, i => aabbs[i] = new MathUtils.Aabb(worldRep.Cells[i].Vertices));
|
||||
|
@ -564,10 +560,6 @@ public class LightMapper
|
|||
visibleCellMap[i] = visibleSet;
|
||||
});
|
||||
|
||||
return visibleCellMap;
|
||||
});
|
||||
|
||||
|
||||
// TODO: Move this functionality to the LGS library
|
||||
// We set up light indices in separately from lighting because the actual
|
||||
// lighting phase takes a lot of shortcuts that we don't want
|
||||
|
@ -610,7 +602,7 @@ public class LightMapper
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!lightVisibleCells[j].Contains(i))
|
||||
if (!visibleCellMap[j].Contains(i))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue