X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=inline;f=scripts%2Fshader-audit.sh;h=46dcb86575400ff0c5e645905fa76ee6149ce505;hb=1c53adcf24bdc6f6191a3a097ed791a0c6d0aeed;hp=196d5703dadb479852b3a7a4d61540313d7aba46;hpb=4d3266df75b37c9a1ea5fff5731e31c46045c359;p=xonotic%2Fxonotic-maps.pk3dir.git diff --git a/scripts/shader-audit.sh b/scripts/shader-audit.sh index 196d5703..46dcb865 100755 --- a/scripts/shader-audit.sh +++ b/scripts/shader-audit.sh @@ -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,17 +342,22 @@ parse_shaderstage_post() mainalphagen=$ss_alphagen elif [ x"$ss_alphagen" = x"vertex" ] && ! $textureblending; then case "$mainblendfunc:$mainalphafunc:$ss_blendfunc:$ss_alphafunc" in + # 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 "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 } @@ -483,7 +488,7 @@ parse_shaderfile_pre() esac } -parse_shaders +parse_shaders *.shader textures_avail=`( cd ..; find textures/ -type f -not -name '*.sh' -not -name '*_norm.*' -not -name '*_glow.*' -not -name '*_gloss.*' -not -name '*_reflect.*' -not -name '*.xcf' -not -name '*.txt' ) | while IFS= read -r T; do shader_normalize "$T"; done | sort -u` textures_used=`echo "${textures_used#$LF}" | sort -u`