diff --git a/Switch_Toolbox_Library/Generics/Texture/GenericTexture.cs b/Switch_Toolbox_Library/Generics/Texture/GenericTexture.cs index 1fb28583..e47574cb 100644 --- a/Switch_Toolbox_Library/Generics/Texture/GenericTexture.cs +++ b/Switch_Toolbox_Library/Generics/Texture/GenericTexture.cs @@ -1090,7 +1090,7 @@ namespace Toolbox.Library return false; } - private static byte[] ConvertBgraToRgba(byte[] bytes) + public static byte[] ConvertBgraToRgba(byte[] bytes) { if (bytes == null) throw new Exception("Data block returned null. Make sure the parameters and image properties are correct!"); diff --git a/Switch_Toolbox_Library/Rendering/RenderableTex.cs b/Switch_Toolbox_Library/Rendering/RenderableTex.cs index b3ae176f..21bd0680 100644 --- a/Switch_Toolbox_Library/Rendering/RenderableTex.cs +++ b/Switch_Toolbox_Library/Rendering/RenderableTex.cs @@ -272,14 +272,15 @@ namespace Toolbox.Library.Rendering default: if (Runtime.UseDirectXTexDecoder) { - return STGenericTexture.DecodeBlock(ImageData, + return STGenericTexture.ConvertBgraToRgba( + STGenericTexture.DecodeBlock(ImageData, width, height, GenericTexture.Format, new byte[0], GenericTexture.Parameters, PALETTE_FORMAT.None, - GenericTexture.PlatformSwizzle); + GenericTexture.PlatformSwizzle)); } else return ImageData;