]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/shader-audit.sh
more fixes. All EE are fixed now.
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
index cf0beec980ca2b03e717acbd5e7e9d97ef27bb7b..74c7d8a1f8e0f3b0c608be1f4cb11157487014a2 100755 (executable)
@@ -89,7 +89,7 @@ use_texture()
 
        if [ x"$3" = x"map" ]; then
                lasttex=$2
-               if [ -n "$AUDIT_ALPHACHANNELS" ]; then
+               if [ -n "$AUDIT_ALPHACHANNELS" ] && [ x"$offsetmapping_match8" != x"firststagedone" ]; then
                        if [ -f "../${2}_norm.tga" ] || [ -f "../${2}_norm.png" ] || [ -f "../${2}_norm.jpg" ]; then
                                case "$offsetmapping_match8" in
                                        '') # no dpoffsetmapping keyword
@@ -105,7 +105,7 @@ use_texture()
                                        default) # offsetmapping keyword without bias
                                                getstats "../${2}_norm.tga"
                                                if [ "$min" -eq "$max" ]; then
-                                                       echo "(EE) shader $1 uses broken normalmap ${2}_norm.tga, maybe use dpoffsetmapping none?"; seterror
+                                                       echo "(WW) shader $1 uses broken normalmap ${2}_norm.tga, maybe use dpoffsetmapping none?"
                                                else
                                                        echo "(EE) shader $1 uses ${2}_norm.tga but lacks median (add to dpoffsetmapping: match8 $median)"; seterror
                                                fi
@@ -115,7 +115,7 @@ use_texture()
                                esac
                        else
                                if [ -n "$offsetmapping_match8" ]; then
-                                       echo "(EE) shader $1 specifies offsetmapping, but texture $2 does not have a normalmap"
+                                       echo "(WW) shader $1 specifies offsetmapping, but texture $2 does not have a normalmap"
                                fi
                        fi
                fi
@@ -292,6 +292,7 @@ parse_shaderstage()
                                        *)
                                                use_texture "$parsing_shader" "`normalize "$A1"`" map
                                                ss_map="`normalize "$A1"`"
+                                               offsetmapping_match8=firststagedone
                                                ;;
                                esac
                                ;;