Change FTEX R8G8B8 compression method to new one. .
This commit is contained in:
parent
d302808d24
commit
029f350526
Binary file not shown.
@ -201,7 +201,7 @@ namespace FirstPlugin
|
||||
internal void SaveBinaryTexture(string FileName)
|
||||
{
|
||||
Console.WriteLine("Test");
|
||||
// Texture.Export(FileName, bntxFile);
|
||||
// Texture.Export(FileName, bntxFile);
|
||||
}
|
||||
internal void SaveDDS(string FileName)
|
||||
{
|
||||
@ -470,9 +470,14 @@ namespace FirstPlugin
|
||||
case ((int)GTX.GX2SurfaceFormat.GX2_SURFACE_FORMAT_T_BC5_SNORM):
|
||||
decomp = DDSCompressor.DecompressBC5(data, (int)Width, (int)Height, true); break;
|
||||
case ((int)GTX.GX2SurfaceFormat.GX2_SURFACE_FORMAT_TC_R8_G8_B8_A8_SNORM):
|
||||
decomp = DDS_PixelDecode.DecodeR8G8B8A8(data, (int)Width, (int)Height); break;
|
||||
byte[] dec = DDSCompressor.DecodePixelBlock(data, (int)Width, (int)Height, DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB);
|
||||
decomp = BitmapExtension.GetBitmap(dec, (int)Width, (int)Height);
|
||||
decomp = TextureData.SwapBlueRedChannels(decomp);
|
||||
break;
|
||||
case ((int)GTX.GX2SurfaceFormat.GX2_SURFACE_FORMAT_TC_R8_G8_B8_A8_UINT):
|
||||
decomp = DDS_PixelDecode.DecodeR8G8B8A8(data, (int)Width, (int)Height); break;
|
||||
decomp = BitmapExtension.GetBitmap(data, (int)Width, (int)Height);
|
||||
decomp = TextureData.SwapBlueRedChannels(decomp);
|
||||
break;
|
||||
default:
|
||||
decomp = Properties.Resources.TextureError;
|
||||
Console.WriteLine($"Format {Format} not supported!");
|
||||
|
Loading…
Reference in New Issue
Block a user