TexTools / xivModdingFramework

GNU General Public License v3.0
9 stars 16 forks source link

texconv/tga fixes #70

Closed helpful-fox-senko-san closed 3 months ago

helpful-fox-senko-san commented 3 months ago

1) Ensure temp directory exists before attempting to use it.

2) RLE encoding in ImageSharp 2.x branch is entirely broken and needs to be disabled to prevent TexConv from exploding. It also produces files that are bigger than uncompressed so there's https://github.com/TexTools/FFXIV_TexTools_UI/pull/293 as well to go with it.

3) -tgazeroalpha flag is documented here: https://github.com/microsoft/DirectXTex/wiki/Texconv -- prevents texconv from assuming an all-zero alpha channel in a TGA file should be treated as all-ones

4) The final commit in this PR is "Faster BC7 encoding". For my single test image it was approximately 100x faster when doing CPU encoding for an identical compressed output size, but you might not want to use it if you find a case where it sucks or something.

BC7 encoding with the slow setting seemed to use something like 6 minutes of CPU time to encode a 1024x512 texture.