Closed mklokocka closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.36%. Comparing base (
2835714
) to head (5d2ce06
).
Also, minor thing but please link your commits to the FNV issue (add #44 at the end)
The algorithm for selection which format to output for texture had two issues:
1) Bad compression formats set for older games. BC5 is not supported at all. BC1 should be used in situations where the input has no alpha. Using BC5 is possible, but increases the file size for no reason. Another reason is that introducing alpha to a previously RGB image affects and breaks i.e. normal maps, for which alpha governs the specularity.
2) The selection of the correct format to used based on alpha didn't work - it checked the input format, not whether it has alpha or not (the alpha is opaque).
This PR solves both of those issues.