Keep pan consistent when switching between integer multiple textures

* Basically for downsample chains and the like, the pixels should now
  exactly line up with each other rather than shifting back and forth.
This commit is contained in:
baldurk
2016-02-21 16:37:58 +01:00
parent 1a05f4fc4a
commit 1f1694af4f
2 changed files with 39 additions and 33 deletions
+9
View File
@@ -76,6 +76,15 @@ namespace renderdocui.Code
else return val;
}
public static float Area(this System.Drawing.PointF val)
{
return val.X * val.Y;
}
public static float Aspect(this System.Drawing.PointF val)
{
return val.X / val.Y;
}
public static uint AlignUp(this uint x, uint a)
{
return (x + (a - 1)) & (~(a - 1));