Nominom / BCnEncoder.NET

Cross-platform texture encoding libary for .NET. With support for BC1-3/DXT, BC4-5/RGTC and BC6-7/BPTC compression. Outputs files in ktx or dds formats.
The Unlicense
108 stars 16 forks source link

Sort out dds file dwFourCC #23

Closed Nominom closed 3 years ago

Nominom commented 3 years ago

Here is some dwFourCC's that might be found in a dds, but the DdsFile does not recognize them.

While encoding, always prefer the DX10 extended header by default. Also add an option for encoder to prefer dwFourCC over DX10 header for formats which can be written there (BC1 - BC5).

Add tests for encoding and decoding files with the dwFourCC preferred.

onepiecefreak3 commented 3 years ago

I think this issue is not necessary anymore. With the last PR there were also refactoring to the DDS file that implemented prioritizing DX10 headers to detect BC6 and 7 for example. If no DX10 header is present, the dwFormat is used instead. This should have solved any problem regarding not detectable DDS formats (that this library supports). It also prefers dwFourCC for all BCn formats, since they are the most widespread.

Nominom commented 3 years ago

We are at least missing BC4U, BC4S, BC5U and BC5S while decoding. I would also like to add an encoder option to prefer Dxt10Header over the DwFourCC, since it simplifies parsing when decoding the file. Maybe the default should be to prefer dwfourcc when possible to maximize backwards compatibility, as it is currently.

Nominom commented 3 years ago

This should be now sorted out in #32. Some tests to verify this wouldn't hurt though.