2using Microsoft.Xna.Framework.Graphics.PackedVector;
29 return num * num2 * num3;
48 for (
int i = 0; i <
height; i += 4)
50 for (
int j = 0; j <
width; j += 4)
52 int resultOffset = i *
width + j;
84 reference =
new Color(bgr.ToVector3());
90 reference2 =
new Color(bgr2.ToVector3());
91 if (num > num2 || !isDxt1)
106 for (
int i = 0; i < 4; i++)
108 for (
int j = 0; j < 4; j++)
110 uint num4 = num3 & 3u;
112 ref
Color reference7 = ref result[resultOffset + i *
width + j];
120 for (
int i = 0; i < 4; i++)
123 for (
int j = 0; j < 4; j++)
125 int num2 = num & 0xF;
127 result[resultOffset + i *
width + j].
A = (byte)(num2 * 255 / 15);
134 byte b =
source[sourceOffset];
135 byte b2 =
source[sourceOffset + 1];
157 for (
int i = 0; i < 4; i++)
159 for (
int j = 0; j < 4; j++)
161 int num2 = (int)num & 7;
static ulong Read48(byte[] source, int offset)
Color[] Decode(byte[] source)
void DecodeExplicitAlphaBlock(byte[] source, int sourceOffset, Color[] result, int resultOffset)
static uint Read32(byte[] source, int offset)
DxtDecoder(int width, int height, SurfaceFormat format)
void DecodeRgbBlock(byte[] source, int sourceOffset, Color[] result, int resultOffset, bool isDxt1)
static ushort Read16(byte[] source, int offset)
void DecodeInterpolatedAlphaBlock(byte[] source, int sourceOffset, Color[] result, int resultOffset)
static Color Lerp(Color value1, Color value2, float amount)