Skip to content

Conversation

@AnriTool
Copy link
Contributor

Added a test to check the decoded image with the result from dxt-js. The result of dxt-js was written to json file in advance.

I made the spread of the expected result in +-1 value. The difference of a pixel, even if all its colors will be shifted by 1 - not noticeable.
Difference in 1 unit can occur due to divisions and rounding of values, when calculating the palette.

Tests for dxt1, dxt3, dxt5.
dxt-js does not support dxt2, dxt4, these encoding methods differ from dxt3 and dxt4 only by multiplication of pixel colors by alpha, there is no such parameter in dxt-js.

@Timic3 Timic3 linked an issue Jun 17, 2025 that may be closed by this pull request
Copy link
Owner

@Timic3 Timic3 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks a lot for your recent contributions. :)

@Timic3 Timic3 merged commit 47888fa into Timic3:master Jun 17, 2025
1 check passed
@AnriTool AnriTool deleted the texture-decoding-test branch June 17, 2025 23:07
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.

Add more tests for textures

2 participants