Skip to content

Commit 75d5408

Browse files
committed
pvr-decompress tool link
1 parent ced7f0f commit 75d5408

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

UnityAsset.php

+1-15
Original file line numberDiff line numberDiff line change
@@ -843,21 +843,7 @@ function exportTo($saveTo, $format = 'png', $extraEncodeParam = '') {
843843
unset($bmp);
844844
$transcodeFile = 'output.bmp';
845845
} else if ($this->outputMethod == 'pvr') {
846-
/*fclose(fopen('output.pvr','wb'));
847-
$pvr = new FileStream('output.pvr');
848-
$pvr->write(hex2bin('5056520300000000'));
849-
$pvr->write(pack('P', [
850-
TextureFormat::PVRTC_RGB2 => 0,
851-
TextureFormat::PVRTC_RGB4 => 2,
852-
TextureFormat::PVRTC_RGBA2 => 1,
853-
TextureFormat::PVRTC_RGBA4 => 3,
854-
][$this->textureFormat]));
855-
$pvr->write(hex2bin('0000000000000000'));
856-
$pvr->write(pack('V', $this->height));
857-
$pvr->write(pack('V', $this->width));
858-
$pvr->write(hex2bin('0100000001000000010000000100000000000000'));
859-
$pvr->write($this->imageData);
860-
unset($pvr);*/
846+
// https://github.com/esterTion/pvrtc-decompress/
861847
file_put_contents('output.pvr', $this->imageData);
862848
exec('pvr-decompress output.pvr output.bmp '.implode(' ', [$this->width, $this->height, [
863849
TextureFormat::PVRTC_RGB2 => 1,

0 commit comments

Comments
 (0)