-
Notifications
You must be signed in to change notification settings - Fork 9
Remove using dxt.js, added custom decoding, support VC/III formats #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
maybe try to describe the code more explicitly, and add comments in order to make it more clear how the algorithms work? |
|
Hey, thanks for the PR, the code looks great! You can add documentation on how the code works, but it's not that critical. Do it only if you have time. :) Also, I would do some benchmarks and check the difference between dxt-js and your own implementation. If dxt-js is faster, then people might prefer to sacrifice bundle size and use it to speed up parsing. In this case, dxt-js would be added to |
Ok, well, I wonder how strong the differences are, I'll do performance tests. |
Not needed, I think it's fine the way it is, just some research regarding performance is required. Thanks :) |
|
@Timic3 I ran speed tests and the result was not comforting. The code was very slow. After that I made some optimizations and fixes (dxt4/dxt5 implementation had artifacts) How the testing was done: Comparative table: |
Timic3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Everything looks good, just one minor change.
|
Looks good, we can add tests in another PR. Thanks for the contribution! |
|
I will make a release once I get home. |


Removed dxt-js. Decompression of DXT, as well as conversion of different palettes and raster formats is done through a helper class.
Based on: DragonFF/blob/master/gtaLib/txd.py
jest TXD test - passes successfully
Tested on canvas in browser
txd - files filled through MagicTxd selecting different formats and versions (only PC GTA III/VC/SA)