Remove using dxt.js, added custom decoding, support VC/III formats#11
Remove using dxt.js, added custom decoding, support VC/III formats#11Timic3 merged 7 commits intoTimic3:masterfrom AnriTool:master
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.
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)