private unsafe static byte[] Read4Bpp(AMemory Memory, Texture Texture) { int Width = Texture.Width; int Height = Texture.Height; byte[] Output = new byte[Width * Height * 4]; ISwizzle Swizzle = GetSwizzle(Texture, 4); fixed(byte *BuffPtr = Output) { long OutOffs = 0; for (int Y = 0; Y < Height; Y++) { for (int X = 0; X < Width; X++) { long Offset = (uint)Swizzle.GetSwizzleOffset(X, Y); int Pixel = Memory.ReadInt32Unchecked(Texture.Position + Offset); *(int *)(BuffPtr + OutOffs) = Pixel; OutOffs += 4; } } } return(Output); }