17 lines
391 B
C#
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);
|
|
}
|
|
}
|
|
} |