Decimation_Mod/Lib/Util/LightingUtils.cs
2020-07-19 22:40:17 -04:00

17 lines
391 B
C#

using Microsoft.Xna.Framework;
namespace Decimation.Lib.Util
{
public static class LightingUtils
{
public static Vector3 Rgb255ToRgb1(int r, int g, int b)
{
return new Vector3(r / 255f, g / 255f, b / 255f);
}
public static Color Rgb1ToColor(this Vector3 rgb)
{
return new Color(rgb.X, rgb.Y, rgb.Z);
}
}
}