Replace mask shader "if + discard" instruction to "clip"

This commit is contained in:
2017-08-06 02:34:37 +07:00
parent 5611da7a7c
commit 08ac4cc73e
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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;
}