Page 1 of 1
How to use DXT1 texture in PS2?
Posted: Thu May 24, 2007 7:58 pm
by jeffcai
I am porting a game from PSP to PS2. But in the game, there are some image files whose format is DXT1.PSP supports DXT1,but PS2 can't. Now I converted DXT1 to INDEX8 with tools, however INDEX8 will spend more memory than DXT1 in PS2. Can I decompress DXT1 by PS2? And how?
Posted: Thu May 24, 2007 8:59 pm
by chp
Decoding DXT is a bit too much for the GS. It can do it, but you will need to derive it yourself (it's a lot of passes since there is no hardware functionality), and in the end the cost of decoding is not worth it.
There are alternatives though:
* Use 4-bit CLUT whenever you can, then you get the cost down to half of 8-bit CLUT.
* VQ texture compression is a good alternative if you need a better ratio. It gives you 2 bits per pixel and the result can be very good, but is heavily dependant on the quality of the encoder. My recommendation is: Get a proper palette quantizer (don't use the VQ algorithm for this) and rasterize the image to 256 colors with floyd-steinberg before running the vector quantizer over the image.
Decompression is done by setting the VQ codebook as palette, and rendering the compressed image to a 4x larger buffer on the GS, which is very cheap.
Posted: Thu May 24, 2007 9:14 pm
by chp
Do note that because of the way the PS2 works you need to swizzle the data before compressing it (since you'll be rendering 8-bit into 32-bit but then read the resulting data as 8-bit).
Posted: Thu May 24, 2007 10:02 pm
by jeffcai
thanks for your advice