]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/shadescript/shade.sh
auto start X server when needed
[xonotic/xonotic.git] / misc / tools / shadescript / shade.sh
index 7533002638769c8566e9bd6bc95375d6d827d12c..1f95c425e1035da6737ead97a4b40198aae46d6b 100644 (file)
@@ -4,7 +4,8 @@ case "$#" in
        2)
                ;;
        *)
-               echo "Usage: $1 directory shader.template"
+               echo "Usage: from xonotic-maps.pk3dir directory, copy and edit shader.template, then"
+               echo "  $0 texturepackname myshader.template"
                exit 1
                ;;
 esac
@@ -59,7 +60,7 @@ find "textures/$1" -type f -path "textures/*/*/*.*" -not -name '*_norm.*' -not -
                        ;;
                *metal*)
                        bounceScale=`echo "$bounceScale + 0.25" | bc -l`
-                       shaderHead="$shaderHead         surfaceparm metalsteps\n"
+                       shaderHead="$shaderHead surfaceparm metalsteps\n"
                        ;;
        esac
 
@@ -87,7 +88,7 @@ find "textures/$1" -type f -path "textures/*/*/*.*" -not -name '*_norm.*' -not -
 
        shaderDiffuse="$F"
        if [ -f "$F""_gloss.tga" ] || [ -f "$F""_gloss.jpg" ] || [ -f "$F""_gloss.png" ]; then
-               bounceScale=`echo "$bounceScale - 0.25" | bc -l`
+               bounceScale=`echo "$bounceScale + 0.25" | bc -l`
        fi
 
        if [ -f "$F""_qei.tga" ] || [ -f "$F""_qei.jpg" ] || [ -f "$F""_qei.png" ]; then