static void UnpackColor(uint color, ref idVec4 unpackedColor) { unpackedColor.Set(((color >> 0) & 255) * (1.0f / 255.0f), ((color >> 8) & 255) * (1.0f / 255.0f), ((color >> 16) & 255) * (1.0f / 255.0f), ((color >> 24) & 255) * (1.0f / 255.0f)); }
static uint PackColor(ref idVec4 color) { uint dx = ColorFloatToByte(color.x); uint dy = ColorFloatToByte(color.y); uint dz = ColorFloatToByte(color.z); return((dx << 0) | (dy << 8) | (dz << 16)); }