hexops / mach

zig game engine & graphics toolkit
https://machengine.org
Other
3.35k stars 160 forks source link

mach: add blessed texture format(s) #1107

Open slimsag opened 12 months ago

slimsag commented 12 months ago

The system now supports two modes: a high quality mode which is internally based off the UASTC compressed texture format, and the original lower quality mode which is based off a subset of ETC1 called "ETC1S". UASTC is for extremely high quality (similar to BC7 quality) textures, and ETC1S is for very small files. The ETC1S system includes built-in data compression, while the UASTC system includes an optional Rate Distortion Optimization (RDO) post-process stage that conditions the encoded UASTC texture data in the .basis file so it can be more effectively LZ compressed by the end user. More technical details about UASTC integration are here.

Perhaps we can use that with just .basis files?

pdoane commented 12 months ago

In the future it could be useful to have platform optimized formats. Having a universal solution is important though and the thinking here sounds good.

anyputer commented 3 months ago

KTX2, WebP, JPEG XL are solid options IMO.

PNG

Pros:

Cons:

WebP

Pros:

Cons:

JPEG XL

Pros:

Cons:

QOI

Pros:

Cons:

KTX2

Pros:

Cons:

slimsag commented 3 months ago

PNG, WebP, JPEG, and others are non-options because they are only disk-compressed.

KTX2 is likely a non-option because the spec for it is nasty.