Skip to content

Add support for games that use DDS textures#1929

Merged
colinator27 merged 6 commits intoUnderminersTeam:masterfrom
luizzeroxis:dds-support
Dec 21, 2025
Merged

Add support for games that use DDS textures#1929
colinator27 merged 6 commits intoUnderminersTeam:masterfrom
luizzeroxis:dds-support

Conversation

@luizzeroxis
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown

github-actions bot commented Sep 27, 2024

Copy link
Copy Markdown
Member

@colinator27 colinator27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpicks, but looks good on the whole. Ideally before merging completely, we should investigate the feasibility of encoding the BCN format (assuming ImageMagick doesn't fully support it?).

@sonic3XE
Copy link
Copy Markdown

sonic3XE commented Sep 28, 2024

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

@luizzeroxis
Copy link
Copy Markdown
Contributor Author

@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
Copy link
Copy Markdown

image

It looks like Android has ASTC available.

@sonic3XE
Copy link
Copy Markdown

sonic3XE commented Sep 28, 2024

@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
Copy link
Copy Markdown

sonic3XE commented Oct 7, 2024

GPU-compressed textures are referred as #1932 including DDS, ASTC, and GNF.

@sigmagamma
Copy link
Copy Markdown

The artifacts for this have been deleted... Is there any way to get them? @luizzeroxis
Thanks!

@luizzeroxis
Copy link
Copy Markdown
Contributor Author

@sigmagamma I updated it to the newest version, it should be downloadable now.

@sigmagamma
Copy link
Copy Markdown

Thanks @luizzeroxis ! it worked!

Copy link
Copy Markdown
Member

@colinator27 colinator27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't fully tested the latest DDS support myself, but I did at least do a regression test. This should be fine to merge for now, but future PR work can be:

  • DDS/BCN encoding (is it possible to do without losing data?)
  • Other GPU-compressed texture format support? (At minimum, maybe just treating the textures as raw data and unviewable...)

@colinator27 colinator27 merged commit 80cb224 into UnderminersTeam:master Dec 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error opening Home World Run's data.win file.

4 participants