Redirect IShader calls via respective *Renderers.

This commit is contained in:
Paul Chote
2013-03-04 20:40:23 +13:00
parent 21e8e3a78d
commit 8a53819f50
4 changed files with 35 additions and 42 deletions

View File

@@ -77,5 +77,12 @@ namespace OpenRA.Graphics
for (float y = r.Top; y < r.Bottom; y++)
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color, color);
}
public void SetShaderParams(ITexture palette, Size screen, float zoom, float2 scroll)
{
shader.SetVec("Scroll", (int)scroll.X, (int)scroll.Y);
shader.SetVec("r1", zoom*2f/screen.Width, -zoom*2f/screen.Height);
shader.SetVec("r2", -1, 1);
}
}
}