diff --git a/AssetStudio/Library/x64/crunch.dll b/AssetStudio/Library/x64/crunch.dll index 22595b4..6509c7f 100644 Binary files a/AssetStudio/Library/x64/crunch.dll and b/AssetStudio/Library/x64/crunch.dll differ diff --git a/AssetStudio/Library/x64/crunchunity.dll b/AssetStudio/Library/x64/crunchunity.dll new file mode 100644 index 0000000..7516cfb Binary files /dev/null and b/AssetStudio/Library/x64/crunchunity.dll differ diff --git a/AssetStudio/Library/x64/texgenpack.dll b/AssetStudio/Library/x64/texgenpack.dll index 05db02d..27d97f5 100644 Binary files a/AssetStudio/Library/x64/texgenpack.dll and b/AssetStudio/Library/x64/texgenpack.dll differ diff --git a/AssetStudio/Library/x86/crunch.dll b/AssetStudio/Library/x86/crunch.dll index f89cd57..749ec02 100644 Binary files a/AssetStudio/Library/x86/crunch.dll and b/AssetStudio/Library/x86/crunch.dll differ diff --git a/AssetStudio/Library/x86/crunchunity.dll b/AssetStudio/Library/x86/crunchunity.dll new file mode 100644 index 0000000..90cf87a Binary files /dev/null and b/AssetStudio/Library/x86/crunchunity.dll differ diff --git a/AssetStudio/Library/x86/texgenpack.dll b/AssetStudio/Library/x86/texgenpack.dll index b258531..70a0596 100644 Binary files a/AssetStudio/Library/x86/texgenpack.dll and b/AssetStudio/Library/x86/texgenpack.dll differ diff --git a/AssetStudio/StudioClasses/Texture2DConverter.cs b/AssetStudio/StudioClasses/Texture2DConverter.cs index d367cd6..635e524 100644 --- a/AssetStudio/StudioClasses/Texture2DConverter.cs +++ b/AssetStudio/StudioClasses/Texture2DConverter.cs @@ -83,7 +83,7 @@ namespace AssetStudio private static extern bool DecompressUnityCRN(byte[] pSrc_file_data, int src_file_size, out IntPtr uncompressedData, out int uncompressedSize); [DllImport("texgenpack.dll", CallingConvention = CallingConvention.Cdecl)] - private static extern void texgenpackdecode(int texturetype, byte[] texturedata, int width, int height, IntPtr bmp, bool fixAlpha); + private static extern void Decode(int texturetype, byte[] texturedata, int width, int height, IntPtr bmp); public Texture2DConverter(Texture2D m_Texture2D) @@ -991,8 +991,7 @@ namespace AssetStudio var bitmap = new Bitmap(m_Width, m_Height); var rect = new Rectangle(0, 0, m_Width, m_Height); var bmd = bitmap.LockBits(rect, ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); - var fixAlpha = glBaseInternalFormat == KTXHeader.GL_RED || glBaseInternalFormat == KTXHeader.GL_RG; - texgenpackdecode((int)texturetype, image_data, m_Width, m_Height, bmd.Scan0, fixAlpha); + Decode((int)texturetype, image_data, m_Width, m_Height, bmd.Scan0); bitmap.UnlockBits(bmd); return bitmap; }