Skip to content

Commit 92005bd

Browse files
committed
Add BC3 texture for Xenoblade X
1 parent e2ba0cd commit 92005bd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

XbTool/XbTool/Common/Textures/Decode.cs

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public static byte[] DecodeTexture(this ITexture texture)
3737
Swizzle.Deswizzle(texture, 3);
3838
decoded = Dxt.DecompressDxt1(texture);
3939
break;
40+
case TextureFormat.BC3 when texture is Xbx.Textures.MtxtTexture tex:
41+
Xbx.Textures.Swizzle.Deswizzle(tex, 7);
42+
decoded = Dxt.DecompressDxt5(texture);
43+
break;
4044
case TextureFormat.BC3:
4145
Swizzle.Deswizzle(texture, 4);
4246
decoded = Dxt.DecompressDxt5(texture);

XbTool/XbTool/Xbx/Textures/MtxtTexture.cs

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public MtxtTexture(DataBuffer data)
4444
case 49:
4545
Format = TextureFormat.BC1;
4646
break;
47+
case 51:
48+
Format = TextureFormat.BC3;
49+
break;
4750
default:
4851
throw new NotImplementedException($"Texture format {Type}");
4952
}

0 commit comments

Comments
 (0)