From: Rudolf Polzer Date: Thu, 14 Jan 2016 21:57:29 +0000 (+0100) Subject: Fix blendfunc auditing for texture blending shaders. X-Git-Tag: xonotic-v0.8.2~150 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4c30edcd2a8277caff58a8337b6bbd4cc16f7f95;p=xonotic%2Fxonotic-maps.pk3dir.git Fix blendfunc auditing for texture blending shaders. --- diff --git a/scripts/shader-audit.sh b/scripts/shader-audit.sh index 8aab433e..61c81c23 100755 --- a/scripts/shader-audit.sh +++ b/scripts/shader-audit.sh @@ -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" ;;