Overhaul depth preview rendering:

* Replace Jet color map with grayscale
* Added Shift + \ hotkey to toggle preview
* Added Shift + [, Shift + ] hotkeys to change contrast
* Added Shift + ;, Shift + ' hotkeys to change offset
This commit is contained in:
Paul Chote
2021-07-25 00:28:29 +01:00
committed by reaperrr
parent 91c5f2cabe
commit 962d6496bd
9 changed files with 342 additions and 31 deletions

View File

@@ -226,9 +226,10 @@ namespace OpenRA.Graphics
shader.SetVec("DepthTextureScale", 128 * depthScale / height);
}
public void SetDepthPreviewEnabled(bool enabled)
public void SetDepthPreview(bool enabled, float contrast, float offset)
{
shader.SetBool("EnableDepthPreview", enabled);
shader.SetVec("DepthPreviewParams", contrast, offset);
}
public void SetAntialiasingPixelsPerTexel(float pxPerTx)