Add a visualisation mode for depth sprites.
For now this displays the raw sprites. It will eventually be repurposed for rendering the proper depth data.
This commit is contained in:
@@ -119,5 +119,10 @@ namespace OpenRA.Graphics
|
||||
shader.SetVec("r1", zoom * 2f / screen.Width, -zoom * 2f / screen.Height);
|
||||
shader.SetVec("r2", -1, 1);
|
||||
}
|
||||
|
||||
public void SetDepthPreviewEnabled(bool enabled)
|
||||
{
|
||||
shader.SetBool("EnableDepthPreview", enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,6 +132,9 @@ namespace OpenRA.Graphics
|
||||
if (World.WorldActor.Disposed)
|
||||
return;
|
||||
|
||||
if (devTrait.Value != null)
|
||||
Game.Renderer.WorldSpriteRenderer.SetDepthPreviewEnabled(devTrait.Value.ShowDepthPreview);
|
||||
|
||||
RefreshPalette();
|
||||
|
||||
if (World.Type == WorldType.Shellmap && !Game.Settings.Game.ShowShellmap)
|
||||
|
||||
Reference in New Issue
Block a user