mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-13 11:39:54 +07:00
Replace mask shader "if + discard" instruction to "clip"
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user