Remove redundant zoom parameter.

This commit is contained in:
Paul Chote
2019-11-03 20:31:28 +00:00
committed by reaperrr
parent 327866ffc3
commit 8c41e6a3f7
3 changed files with 10 additions and 10 deletions

View File

@@ -155,17 +155,17 @@ namespace OpenRA.Graphics
shader.SetTexture("Palette", palette);
}
public void SetViewportParams(Size screen, float depthScale, float depthOffset, float zoom, int2 scroll)
public void SetViewportParams(Size screen, float depthScale, float depthOffset, int2 scroll)
{
shader.SetVec("Scroll", scroll.X, scroll.Y, scroll.Y);
shader.SetVec("r1",
zoom * 2f / screen.Width,
zoom * 2f / screen.Height,
-depthScale * zoom / screen.Height);
2f / screen.Width,
2f / screen.Height,
-depthScale / screen.Height);
shader.SetVec("r2", -1, -1, 1 - depthOffset);
// Texture index is sampled as a float, so convert to pixels then scale
shader.SetVec("DepthTextureScale", 128 * depthScale * zoom / screen.Height);
shader.SetVec("DepthTextureScale", 128 * depthScale / screen.Height);
}
public void SetDepthPreviewEnabled(bool enabled)