]> de.git.xonotic.org Git - xonotic/xonotic-maps.pk3dir.git/blobdiff - scripts/shader-audit.sh
Delete the "cubemaps" folder, which was meant to be temporary but has been around...
[xonotic/xonotic-maps.pk3dir.git] / scripts / shader-audit.sh
index 8aab433ebc783ec62d8c26977e6877f9f39e63b4..46dcb86575400ff0c5e645905fa76ee6149ce505 100755 (executable)
@@ -233,8 +233,8 @@ use_texture()
                                        ;;
                        esac
                        ;;
-               ## RULE: textures/FOO/* must use textures/FOO/*, for FOO in decals, liquids_water, liquids_slime, liquids_lava, alphamod
-               textures/decals/*|textures/liquids_*/*|textures/effects_*/*|textures/screens/*|textures/logos/*|textures/alphamod/*)
+               ## RULE: textures/FOO/* must use textures/FOO/*, for FOO in decals, liquids_water, liquids_slime, liquids_lava, alphamod, solarpanel
+               textures/decals/*|textures/liquids_*/*|textures/effects_*/*|textures/screens/*|textures/logos/*|textures/alphamod/*|textures/solarpanel/*)
                        pre=`echo "$1" | cut -d / -f 1-2`
                        case "$2" in
                                "$pre"/*)
@@ -342,12 +342,16 @@ 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, blend
+                               none:none:blend:none) textureblending=true ;;
                                none:none:"gl_src_alpha gl_one_minus_src_alpha":none) textureblending=true ;;
-                               none:none:filter:none) textureblending=true ;;
+                               "gl_one gl_zero":none:blend:none) textureblending=true ;;
+                               "gl_one zl_zero":none:"gl_src_alpha gl_one_minus_src_alpha":none) textureblending=true ;;
+                               # none, alphafunc
                                none:none:none:g*) textureblending=true ;;
-                               "gl_one gl_zero":none:filter:none) textureblending=true ;;
+                               none:none:"gl_one gl_zero":g*) textureblending=true ;;
                                "gl_one gl_zero":none:none:g*) textureblending=true ;;
+                               "gl_one gl_zero":none:"gl_one gl_zero":g*) textureblending=true ;;
                                *)
                                        err "$parsing_shader uses texture blending, but that requires first stage to have no blendfunc/alphatest, and requires second stage to be blendfunc filter"
                                        ;;