]> git.rm.cloudns.org Git - xonotic/xonotic-maps.pk3dir.git/commitdiff
minor fixes
authorRudolf Polzer <divverent@xonotic.org>
Thu, 14 Jan 2016 02:47:34 +0000 (03:47 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 14 Jan 2016 02:47:54 +0000 (03:47 +0100)
scripts/shader-audit.sh
scripts/shader-parser.subr

index c583f0ee4f7a041026011f0ab56d800e009f01c4..8aab433ebc783ec62d8c26977e6877f9f39e63b4 100755 (executable)
@@ -342,17 +342,18 @@ parse_shaderstage_post()
                        mainalphagen=$ss_alphagen
                elif [ x"$ss_alphagen" = x"vertex" ] && ! $textureblending; then
                        case "$mainblendfunc:$mainalphafunc:$ss_blendfunc:$ss_alphafunc" in
+                               # TODO check against dp
                                none:none:"gl_src_alpha gl_one_minus_src_alpha":none) textureblending=true ;;
                                none:none:filter:none) textureblending=true ;;
                                none:none:none:g*) textureblending=true ;;
                                "gl_one gl_zero":none:filter:none) textureblending=true ;;
                                "gl_one gl_zero":none:none:g*) textureblending=true ;;
                                *)
-                                       err "texture blending requires first stage to have no blendfunc/alphatest, and requires second stage to be blendfunc filter"
+                                       err "$parsing_shader uses texture blending, but that requires first stage to have no blendfunc/alphatest, and requires second stage to be blendfunc filter"
                                        ;;
                        esac
                else
-                       err "multistage shader without alphagen vertex, or using more than 2 stages, is not supported by DarkPlaces"
+                       err "$parsing_shader, a multistage shader without alphagen vertex, or using more than 2 stages, is not supported by DarkPlaces"
                fi
        fi
 }
index ef82832f427839513e1d036c5a5e7caedeec8f55..5f18cec84a90434f80a55540bfd15bf52c99b8b9 100644 (file)
@@ -4,7 +4,7 @@
 
 shader_normalize()
 {
-       echo "$1" | sed 's/\.\(tga\|jpg\|png\)$//'
+       echo "$1" | sed 's/^"//; s/"$//; s/\.\(tga\|jpg\|png\)$//'
 }
 
 parse_shaderstage_pre()