]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/compress-texture
Merge branch 'sev/unifont_update' into 'master'
[xonotic/xonotic.git] / misc / tools / compress-texture
index a9d9ae28878718547aa1919422b8c01c1e38a0a4..9e3b58e5e26719f9d25a33644ba43f58c198cf88 100755 (executable)
@@ -46,7 +46,7 @@ esac
 
 if [ -n "$fourcchack" ]; then
        fourcchack_dir=`mktemp -d`
-       convert "$src" -fx "u*u.a" "$fourcchack_dir/src.$ext"
+       convert "$src" -fx "u*u.a" -type TrueColorMatte "$fourcchack_dir/src.$ext"
        src="$fourcchack_dir/src.$ext"
 fi
 
@@ -85,6 +85,14 @@ case "$tool" in
                esac
                nvcompress $f "$@" "$src" "$dst"
                ;;
+       s2tc)
+               case "$format" in
+                       dxt1) f="-t DXT1" ;;
+                       dxt3) f="-t DXT3" ;;
+                       dxt5) f="-t DXT5" ;;
+               esac
+               s2tc_compress $f "$@" -i "$src" -o "$dst"
+               ;;
 esac
 
 if [ -n "$fourcchack" ]; then