diff --git a/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXImporterSettings.cs b/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXImporterSettings.cs index 8f2e7528..16737741 100644 --- a/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXImporterSettings.cs +++ b/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXImporterSettings.cs @@ -140,6 +140,9 @@ namespace FirstPlugin Bitmap Image = BitmapExtension.GetBitmap(DecompressedData[SurfaceLevel], (int)TexWidth, (int)TexHeight); if (FlipY) Image.RotateFlip(RotateFlipType.RotateNoneFlipY); + if (UseBc4Alpha && (Format == GX2.GX2SurfaceFormat.T_BC4_UNORM || Format == GX2.GX2SurfaceFormat.T_BC4_SNORM)) { + Image = BitmapExtension.SetChannel(Image, STChannelType.Alpha, STChannelType.Alpha, STChannelType.Alpha, STChannelType.One); + } Console.WriteLine($"FlipY {FlipY}"); diff --git a/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXTextureImporter.cs b/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXTextureImporter.cs index bbdbca4e..da95af9a 100644 --- a/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXTextureImporter.cs +++ b/File_Format_Library/GUI/TextureUI/Importers/GX2/GTXTextureImporter.cs @@ -210,9 +210,11 @@ namespace FirstPlugin if (setting.FlipY) bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY); - if (setting.UseBc4Alpha) { + if (setting.UseBc4Alpha && (setting.Format == GX2.GX2SurfaceFormat.T_BC4_UNORM || + setting.Format == GX2.GX2SurfaceFormat.T_BC4_UNORM)) + { bitmap = BitmapExtension.SetChannel(bitmap, - STChannelType.Red, STChannelType.Red, STChannelType.Red, STChannelType.Red); + STChannelType.One, STChannelType.One, STChannelType.One, STChannelType.Red); } if (pictureBox1.InvokeRequired)