Sort out dds file dwFourCC
Nominom opened this issue · 3 comments
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.
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.
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.