]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
support s2tc for texture compression
authorRudolf Polzer <divverent@xonotic.org>
Thu, 14 Jul 2011 19:48:08 +0000 (21:48 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 14 Jul 2011 19:48:08 +0000 (21:48 +0200)
misc/tools/compress-texture

index a9d9ae28878718547aa1919422b8c01c1e38a0a4..5141b92d04a0da6ec0f1aff748190114e48a12ad 100755 (executable)
@@ -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 $f "$@" -i "$src" -o "$dst"
+               ;;
 esac
 
 if [ -n "$fourcchack" ]; then