fixing a pile of stupid texel-offset-related bugs

This commit is contained in:
Chris Forbes
2010-01-06 10:08:53 +13:00
parent 72605ebfc8
commit e82107b69b
2 changed files with 4 additions and 7 deletions

View File

@@ -19,10 +19,10 @@ namespace OpenRa.Game.Graphics
this.channel = channel;
uv = new RectangleF(
(float)(bounds.Left + 0.5f) / sheet.Size.Width,
(float)(bounds.Top + 0.5f) / sheet.Size.Height,
(float)(bounds.Width) / sheet.Size.Width,
(float)(bounds.Height) / sheet.Size.Height);
(float)(bounds.Left + .5f) / sheet.Size.Width,
(float)(bounds.Top + .5f) / sheet.Size.Height,
(float)(bounds.Width - .5f) / sheet.Size.Width,
(float)(bounds.Height - .5f) / sheet.Size.Height);
uvhax = new float2[]
{