mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-14 20:21:27 +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
|
* Fix warning on add missing components
|
||||||
* Replace string shader properties to id
|
* Replace string shader properties to id
|
||||||
* Replace shader "if" instruction to "step"
|
* Replace shader "if" instruction to "step"
|
||||||
|
* Replace mask shader "if + discard" instruction to "clip"
|
||||||
|
|
||||||
###### Version 1.3.8
|
###### Version 1.3.8
|
||||||
* Fix shape groups in tweens problems
|
* 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 c = tex2D(_MainTex, IN.uv);
|
||||||
fixed4 a = tex2D(_AlphaTex, IN.uv).r;
|
fixed4 a = tex2D(_AlphaTex, IN.uv).r;
|
||||||
c.a = lerp(c.a, a.r, _ExternalAlpha);
|
c.a = lerp(c.a, a.r, _ExternalAlpha);
|
||||||
if ( c.a < 0.01 ) {
|
clip(c.a - 0.01);
|
||||||
discard;
|
|
||||||
}
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ https://gist.github.com/talecrafter/111ea3345911bd238f4998b4d5a04bf3
|
|||||||
**** DONE Заменить установку пропертей шейдера с текстовых имён на id
|
**** DONE Заменить установку пропертей шейдера с текстовых имён на id
|
||||||
**** DONE Заюзать step вместо if в шейдере
|
**** DONE Заюзать step вместо if в шейдере
|
||||||
https://web.archive.org/web/20161214092913/http://http.developer.nvidia.com:80/Cg/step.html
|
https://web.archive.org/web/20161214092913/http://http.developer.nvidia.com:80/Cg/step.html
|
||||||
|
**** DONE if + discard заменить на clip
|
||||||
*** Баги
|
*** Баги
|
||||||
**** TODO Скейлы клипов не проверяются в группах
|
**** TODO Скейлы клипов не проверяются в группах
|
||||||
**** TODO graphics_scale не влияет на растр
|
**** TODO graphics_scale не влияет на растр
|
||||||
|
|||||||
Reference in New Issue
Block a user