UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.19k stars 233 forks source link

Add support for games that use DDS textures #1929

Open luizzeroxis opened 1 month ago

luizzeroxis commented 1 month ago

Description

Fix #1907

Some games use the official GM-GPUTextureCompression extension to use GPU compressed textures. One of the formats supported is BCN compression, which uses the DDS format, at least on Windows. This PR aims to allow games using that to be modded.

Caveats

Although you can load it, there's no support for saving these textures in their original format, so it just saves in PNG format and gives a warning to the user. This works, but obviously will have a performance impact. This compression format is lossy anyway.

Notes

There's other formats supported by this extension, and in other operating systems, hopefully this can be addressed in future PRs.

github-actions[bot] commented 1 month ago

Download the artifacts for this pull request here:

GUI:

CLI:

sonic3XE commented 1 month ago

There is another file extension that was never mentioned before. (e.g. .ASTC for mobile platforms, .GNF for playstation platforms)

luizzeroxis commented 1 month ago

@sonic3XE Could you send a game that uses it, or tell which custom option and OS creates such format, so it can be tested?

sonic3XE commented 1 month ago

image

It looks like Android has ASTC available.

sonic3XE commented 1 month ago

@luizzeroxis game.droid UTMT may fail at loading that texture when trying to open. Also, it has a constant header in hex: 13 AB A1 5C

sonic3XE commented 1 month ago

GPU-compressed textures are referred as https://github.com/UnderminersTeam/UndertaleModTool/issues/1932 including DDS, ASTC, and GNF.