Add wall-based ambient occlusion (#38276)
* Add wall ambient occlusion * wawawewa * Work * cvars * Comment to make slart happy
This commit is contained in:
@@ -62,6 +62,8 @@ public sealed class RoofOverlay : Overlay
|
||||
worldHandle.RenderInRenderTarget(target,
|
||||
() =>
|
||||
{
|
||||
var invMatrix = target.GetWorldToLocalMatrix(eye, scale);
|
||||
|
||||
for (var i = 0; i < _grids.Count; i++)
|
||||
{
|
||||
var grid = _grids[i];
|
||||
@@ -69,8 +71,6 @@ public sealed class RoofOverlay : Overlay
|
||||
if (!_entManager.TryGetComponent(grid.Owner, out ImplicitRoofComponent? roof))
|
||||
continue;
|
||||
|
||||
var invMatrix = target.GetWorldToLocalMatrix(eye, scale);
|
||||
|
||||
var gridMatrix = _xformSystem.GetWorldMatrix(grid.Owner);
|
||||
var matty = Matrix3x2.Multiply(gridMatrix, invMatrix);
|
||||
|
||||
@@ -94,13 +94,13 @@ public sealed class RoofOverlay : Overlay
|
||||
worldHandle.RenderInRenderTarget(target,
|
||||
() =>
|
||||
{
|
||||
var invMatrix = target.GetWorldToLocalMatrix(eye, scale);
|
||||
|
||||
foreach (var grid in _grids)
|
||||
{
|
||||
if (!_entManager.TryGetComponent(grid.Owner, out RoofComponent? roof))
|
||||
continue;
|
||||
|
||||
var invMatrix = target.GetWorldToLocalMatrix(eye, scale);
|
||||
|
||||
var gridMatrix = _xformSystem.GetWorldMatrix(grid.Owner);
|
||||
var matty = Matrix3x2.Multiply(gridMatrix, invMatrix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user