Skip to content

Instantly share code, notes, and snippets.

@tomazsaraiva
Last active March 29, 2018 15:54
Show Gist options
  • Save tomazsaraiva/cafed56349d72d2515b476f30870b047 to your computer and use it in GitHub Desktop.
Save tomazsaraiva/cafed56349d72d2515b476f30870b047 to your computer and use it in GitHub Desktop.
Advanced DXTc texture compression and transcoding library https://github.com/Unity-Technologies/crunch/tree/unity
@ECHO OFF
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf0.crn -mipMode UseSourceOrGenerate -maxmips 2
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf1.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 2048 2048
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf2.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 1024 1024
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf3.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 512 512
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf4.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 256 256
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf5.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 128 128
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf6.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 64 64
FOR %%f IN (*.jpg) DO crunch -file "%%f" -quality 255 -out %%~nf7.crn -mipMode UseSourceOrGenerate -maxmips 2 -rescale 32 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment