diff --git a/Assets/FlashTools/Docs/CHANGELOG.md b/Assets/FlashTools/Docs/CHANGELOG.md index 43b254d..bf47cbd 100644 --- a/Assets/FlashTools/Docs/CHANGELOG.md +++ b/Assets/FlashTools/Docs/CHANGELOG.md @@ -4,6 +4,7 @@ * Fix warning on add missing components * Replace string shader properties to id * Replace shader "if" instruction to "step" +* Replace mask shader "if + discard" instruction to "clip" ###### Version 1.3.8 * Fix shape groups in tweens problems diff --git a/Assets/FlashTools/Resources/Materials/SwfBaseCG.cginc b/Assets/FlashTools/Resources/Materials/SwfBaseCG.cginc index 8be2ff1..f9ed7b0 100644 --- a/Assets/FlashTools/Resources/Materials/SwfBaseCG.cginc +++ b/Assets/FlashTools/Resources/Materials/SwfBaseCG.cginc @@ -156,9 +156,7 @@ inline fixed4 swf_mask_frag(swf_mask_v2f_t IN) : SV_Target { fixed4 c = tex2D(_MainTex, IN.uv); fixed4 a = tex2D(_AlphaTex, IN.uv).r; c.a = lerp(c.a, a.r, _ExternalAlpha); - if ( c.a < 0.01 ) { - discard; - } + clip(c.a - 0.01); return c; } diff --git a/ProjectStuff/FlashTools.org b/ProjectStuff/FlashTools.org index f41341b..8fdb016 100644 --- a/ProjectStuff/FlashTools.org +++ b/ProjectStuff/FlashTools.org @@ -63,6 +63,7 @@ https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3 **** DONE Заменить установку пропертей шейдера с текстовых имён на id **** DONE Заюзать step вместо if в шейдере https://web.archive.org/web/20161214092913/http://http.developer.nvidia.com:80/Cg/step.html +**** DONE if + discard заменить на clip *** Баги **** TODO Скейлы клипов не проверяются в группах **** TODO graphics_scale не влияет на растр