Skip to content

Commit f5517ed

Browse files
authored
Merge pull request #22 from Lunaretic/master
Default textures are now based on usage type. New Materials are now …
2 parents a4f8a1c + 0c9146c commit f5517ed

File tree

13 files changed

+86
-69
lines changed

13 files changed

+86
-69
lines changed

xivModdingFramework/Materials/FileTypes/Mtrl.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -633,17 +633,7 @@ public async Task<int> ImportMtrl(XivMtrl xivMtrl, IItem item, string source)
633633
continue;
634634
}
635635

636-
var format = XivTexFormat.DXT1;
637-
if(mapInfo.Usage == XivTexType.Normal)
638-
{
639-
if(mapInfo.Format == MtrlTextureDescriptorFormat.UsesColorset)
640-
{
641-
format = XivTexFormat.DXT5;
642-
} else
643-
{
644-
format = XivTexFormat.A8R8G8B8;
645-
}
646-
}
636+
var format = XivTexFormat.A8R8G8B8;
647637

648638
var xivTex = new XivTex();
649639
xivTex.TextureTypeAndPath = new TexTypePath()
@@ -652,7 +642,7 @@ public async Task<int> ImportMtrl(XivMtrl xivMtrl, IItem item, string source)
652642
};
653643
xivTex.TextureFormat = format;
654644

655-
var di = Tex.GetDefaultTexturePath(xivTex.TextureFormat);
645+
var di = Tex.GetDefaultTexturePath(mapInfo.Usage);
656646

657647
var newOffset = await _tex.TexDDSImporter(xivTex, item, di, source);
658648

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)