Rendering - Sovled inconsistencies between software and Vulkan rendering

LED sampling - Improved LED sampling on <100% scale
This commit is contained in:
Robert committed 2021-03-25 19:59:28 +01:00
1 parent a0faeb21fd
commit eb7c89d4ad
15 files changed
+158 -76

No files matched your search

@@ -16,7 +16,7 @@ namespace Artemis.Core
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int RoundToInt(this float number)
{
return (int) Math.Round(number, MidpointRounding.AwayFromZero);
return (int) MathF.Round(number, MidpointRounding.AwayFromZero);
}
}
}
@@ -25,11 +25,16 @@ namespace Artemis.Core
public static SKRect ToSKRect(this Rectangle rectangle)
{
return SKRect.Create(
(float) rectangle.Location.X,
(float) rectangle.Location.Y,
(float) rectangle.Size.Width,
(float) rectangle.Size.Height
rectangle.Location.X,
rectangle.Location.Y,
rectangle.Size.Width,
rectangle.Size.Height
);
}
public static SKRectI ToSKRectI(this Rectangle rectangle)
{
return SKRectI.Round(ToSKRect(rectangle));
}
}
}