Fix light vis not including light's cell in fast mode
This commit is contained in:
parent
3edc5eb758
commit
8864993463
|
@ -564,8 +564,8 @@ public class LightMapper
|
||||||
}
|
}
|
||||||
|
|
||||||
var visibleSet = settings.FastPvs switch {
|
var visibleSet = settings.FastPvs switch {
|
||||||
true => pvs.ComputeVisibilityFast(lightCellMap[i]),
|
true => pvs.ComputeVisibilityFast(cellIdx),
|
||||||
false => pvs.ComputeVisibilityExact(_lights[i].Position, lightCellMap[i], _lights[i].Radius)
|
false => pvs.ComputeVisibilityExact(_lights[i].Position, cellIdx, _lights[i].Radius)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Log.Information("Light {i} sees {c} cells", i, visibleSet.Count);
|
// Log.Information("Light {i} sees {c} cells", i, visibleSet.Count);
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class PotentiallyVisibleSet
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
var visibleCells = new HashSet<int>();
|
var visibleCells = new HashSet<int> { cellIdx };
|
||||||
foreach (var edgeIdx in _graph[cellIdx].EdgeIndices)
|
foreach (var edgeIdx in _graph[cellIdx].EdgeIndices)
|
||||||
{
|
{
|
||||||
var edge = _edges[edgeIdx];
|
var edge = _edges[edgeIdx];
|
||||||
|
|
Loading…
Reference in New Issue