{"id":208532,"date":"2014-01-09T12:20:03","date_gmt":"2014-01-09T08:20:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=208532"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=208532","title":{"rendered":"<span class=\"post_title\">\u041f\u0438\u0448\u0438\u043c Dissolve Shader<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u043e\u0432\u044b\u043c \u0433\u043e\u0434\u043e\u043c, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0438 \u044f \u0438\u0437\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0448\u0435\u0439\u0434\u0435\u0440 \u0440\u0430\u0441\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430. 31 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u044f \u0435\u0433\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0447\u0442\u043e-\u0442\u043e \u0441 \u043d\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0430 \u0430\u0441\u0441\u0435\u0442 \u0441\u0442\u043e\u0440\u0435 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u043e \u0443\u0436\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0435\u0441\u0442\u044c, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u044d\u0442\u043e:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/PaNYPZCGXZ4?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u0443\u0442\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e:  <\/p>\n<ul>\n<li>Alpha<\/li>\n<li>CutOff<\/li>\n<li>Grab Texture<\/li>\n<\/ul>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f 3 \u0448\u0435\u0439\u0434\u0435\u0440\u0430, 2 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043b\u044c\u0444\u0443 \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c \u043d\u0430 \u043c\u043e\u0431. \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445. \u0418 \u043e\u0434\u0438\u043d \u0441 AlphaTest \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0441\u0438\u043c\u043f\u0430\u0442\u0438\u0447\u043d\u0435\u0439 \u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0436\u043e\u0440\u043b\u0438\u0432\u044b\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f AlphaTest \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0445 \u043f\u043e\u043b\u0438\u0433\u043e\u043d\u043e\u0432 \u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u0441\u043b\u043e\u0435\u043d\u0438\u0435. \u041d\u043e \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e 2.0 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 3.0 \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043c\u043e\u0431. \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445. <\/p>\n<h4>\u041a\u0430\u0440\u043a\u0430\u0441<\/h4>\n<p>  \u041e\u0431\u0449\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439:  <\/p>\n<ul>\n<li> \u0411\u0435\u0440\u0451\u043c \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0441 \u043c\u0430\u0441\u043a\u0438 \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043f\u0440\u044f\u043c\u043e \u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b <\/li>\n<li> \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u0443 \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441 N<\/li>\n<li> \u0415\u0441\u043b\u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 N \u0442\u043e \u0430\u043b\u044c\u0444\u0443 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043d\u043e\u043b\u0438\u043a<\/li>\n<\/ul>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043a\u0430\u043a \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0438\u0434\u0435\u043e.<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/lOOmzbBvWsM?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>  \u041d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b \u043c\u0430\u043f, \u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u0440\u0443\u0442\u043e\u0433\u043e. \u041b\u0438\u043d\u0438\u0439! <br \/>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u043d\u043b\u0430\u0439\u043d\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u043e\u0439:  <\/p>\n<ul>\n<li> \u0411\u0435\u0440\u0451\u043c \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0441 \u043c\u0430\u0441\u043a\u0438 \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u0441 \u043e\u0444\u0444\u0441\u0435\u0442\u043e\u043c \u043f\u043e UV + LineSize. \u0418 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043d\u043e \u043e\u0444\u0444\u0441\u0435\u0442 \u0443\u0436\u0435 UV \u2014 LineSize <\/li>\n<li> \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u043c\u0435\u043d\u044c\u0448\u0435 N, \u0442\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0446\u0432\u0435\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043b\u0438\u043d\u0438\u0439 <\/li>\n<li> \u0418\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u0432\u0438\u043c \u0430\u043b\u044c\u0444\u0443 \u0432 \u043d\u043e\u043b\u044c (\u042d\u0442\u043e \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435) <\/li>\n<\/ul>\n<p>  \u0420\u0435\u0437\u044e\u043c\u0438\u0440\u0443\u044e \u0432\u044b\u0448\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u0430\u0441\u043a\u0435 \u0438 \u0435\u0441\u043b\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u043e\u0442\u0441\u0435\u043a\u0430\u0435\u043c \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0435\u0442\u0443 \u043b\u0438 \u0432\u043f\u0440\u0438\u0442\u044b\u043a \u043a \u043d\u0435\u043c\u0443 \u043d\u0435 \u043e\u0442\u0441\u0435\u0447\u0451\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c \u043c\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043a\u0440\u0430\u0435\u043c \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0446\u0432\u0435\u0442. <\/p>\n<h4>\u0411\u043b\u0438\u0436\u0435 \u043a <s>\u0442\u0435\u043b\u0443<\/s> \u043a\u043e\u0434\u0443<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u0432\u044b\u0448\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0435\u043a \u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043b\u0438\u043d\u0438\u0438 \u0435\u0449\u0451 \u043f\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0442 \u043f\u043e\u043b\u043e\u0442\u043d\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0448\u0435\u0439\u0434\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> Shader &quot;HolyMonkey\/Dissolve\/Bumped&quot; {  \tProperties { \t    _MainColor (&quot;Main Color&quot;, Color) = (1,1,1,1) \t\t_MainTex (&quot;Base (RGB)&quot;, 2D) = &quot;white&quot; {} \t\t_Mask(&quot;Mask To Dissolve&quot;, 2D) = &quot;white&quot; {} \t\t_LineTexture(&quot;Line Texture&quot;, 2D) = &quot;white&quot; {} \t\t_Range (&quot;Range&quot;, Range(0,3)) = 0 \t\t_LineSize (&quot;LineSize&quot;, Float) = 0.001 \t\t_Color (&quot;Line Color&quot;, Color) = (1,1,1,1) \t\t_BumpMap (&quot;Normalmap&quot;, 2D) = &quot;bump&quot; {} \t\t_Cutoff (&quot;Alpha cutoff&quot;, Range(0,1)) = 0.5 \t} \t \tSubShader { \t\tTags {&quot;Queue&quot;=&quot;AlphaTest&quot; &quot;IgnoreProjector&quot;=&quot;True&quot; &quot;RenderType&quot;=&quot;TransparentCutout&quot;} \t\tLOD 300 \t\tZWrite On \t\tCull Off \t\tCGPROGRAM  \t\t#pragma target 3.0 \t\t#include &quot;UnityCG.cginc&quot; \t\t#pragma surface surf Lambert alphatest:_Cutoff           \t\tsampler2D _MainTex; \t\tsampler2D _LineTexture; \t\tsampler2D _BumpMap; \t\tsampler2D _Mask; \t\thalf4 _Color; \t\thalf4 _MainColor; \t\tfloat _Range; \t\tfloat _LineSize; \t\t            \t\tstruct Input { \t\t\tfloat2 uv_MainTex; \t\t\tfloat2 uv_BumpMap;                         float2 uv_Detail; \t\t};              \t\tvoid surf (Input IN, inout SurfaceOutput o) { \t\t\thalf4 c = tex2D (_MainTex, IN.uv_MainTex); \t\t\thalf4 m = tex2D (_Mask, IN.uv_MainTex); \t\t        half4 lc =  tex2D (_Mask, IN.uv_MainTex - _LineSize); \t\t        half4 lc2 = tex2D (_Mask, IN.uv_MainTex + _LineSize); \t\t\thalf4 lc3 = tex2D(_LineTexture, IN.uv_MainTex + _SinTime) * _Color;     \t\t\t  \t\t        o.Albedo = c *  _MainColor; \t\t        o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); \t\t        o.Alpha = 1; \t\t     \t\t\tfloat factor = m.rgb.x + m.rgb.y + m.rgb.z; \t\t\tif(factor &gt;= _Range) \t\t\t{ \t\t\t   float factor2 = lc.rgb.x + lc.rgb.y + lc.rgb.z; \t\t\t   float factor3 = lc2.rgb.x + lc2.rgb.y + lc2.rgb.z; \t\t\t   if(factor2 &lt; _Range || factor3 &lt; _Range) \t\t\t   { \t\t\t      o.Albedo = lc3; \t\t\t   } \t\t\t   else \t\t\t   {                   o.Alpha = 0.0;                }             } \t\t} \t\tENDCG \t}  \tFallback &quot;Diffuse&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0415\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c \u043a\u0443\u043b\u0438\u043d\u0433\u043e\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;HolyMonkey\/Dissolve\/Culling-Mobile&quot; {  \tProperties { \t    _MainColor (&quot;Main Color&quot;, Color) = (1,1,1,1) \t\t_MainTex (&quot;Base (RGB)&quot;, 2D) = &quot;white&quot; {} \t\t_Mask(&quot;Mask To Dissolve&quot;, 2D) = &quot;white&quot; {} \t\t_LineTexture(&quot;Line Texture&quot;, 2D) = &quot;white&quot; {} \t\t_Range (&quot;Range&quot;, Range(0,3)) = 0 \t\t_LineSize (&quot;LineSize&quot;, Float) = 0.001 \t\t_Color (&quot;Line Color&quot;, Color) = (1,1,1,1) \t\t_BumpMap (&quot;Normalmap&quot;, 2D) = &quot;bump&quot; {} \t} \t \tSubShader { \t\tTags {&quot;Queue&quot;=&quot;Transparent&quot; &quot;IgnoreProjector&quot;=&quot;True&quot; &quot;RenderType&quot;=&quot;Transparent&quot;} \t\tLOD 300 \t\tCGPROGRAM  \t\t#pragma target 2.0 \t\t#include &quot;UnityCG.cginc&quot; \t\t#pragma surface surf Lambert alpha            \t\tsampler2D _MainTex; \t\tsampler2D _LineTexture; \t\tsampler2D _BumpMap; \t\tsampler2D _Mask; \t\thalf4 _Color; \t\thalf4 _MainColor; \t\tfloat _Range; \t\tfloat _LineSize; \t\t            \t\tstruct Input { \t\t\tfloat2 uv_MainTex; \t\t\tfloat2 uv_BumpMap;             float2 uv_Detail; \t\t};              \t\tvoid surf (Input IN, inout SurfaceOutput o) { \t\t\thalf4 c = tex2D (_MainTex, IN.uv_MainTex); \t\t\thalf4 m = tex2D (_Mask, IN.uv_MainTex); \t\t    half4 lc =  tex2D (_Mask, IN.uv_MainTex - _LineSize); \t\t    half4 lc2 = tex2D (_Mask, IN.uv_MainTex + _LineSize); \t\t\thalf4 lc3 = tex2D(_LineTexture, IN.uv_MainTex + _SinTime) * _Color;     \t\t\t  \t\t    o.Albedo = c *  _MainColor; \t\t    o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); \t\t    o.Alpha = 1; \t\t     \t\t\tfloat factor = m.rgb.x + m.rgb.y + m.rgb.z; \t\t\tif(factor &gt;= _Range) \t\t\t{ \t\t\t   float factor2 = lc.rgb.x + lc.rgb.y + lc.rgb.z; \t\t\t   float factor3 = lc2.rgb.x + lc2.rgb.y + lc2.rgb.z; \t\t\t   if(factor2 &lt; _Range || factor3 &lt; _Range) \t\t\t   { \t\t\t      o.Albedo = lc3; \t\t\t   } \t\t\t   else \t\t\t   {                   o.Alpha = 0.0;                }             } \t\t} \t\tENDCG \t}  \tFallback &quot;Diffuse&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u043e\u0439 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;HolyMonkey\/Dissolve\/NotTransparent&quot; {  \tProperties { \t    _MainColor (&quot;Main Color&quot;, Color) = (1,1,1,1) \t\t_MainTex (&quot;Base (RGB)&quot;, 2D) = &quot;white&quot; {} \t\t_BackTexture (&quot;Back Texture&quot;, 2D) = &quot;white&quot; {} \t\t_Mask(&quot;Mask To Dissolve&quot;, 2D) = &quot;white&quot; {} \t\t_LineTexture(&quot;Line Texture&quot;, 2D) = &quot;white&quot; {} \t\t_Range (&quot;Range&quot;, Range(0,3)) = 0 \t\t_LineSize (&quot;LineSize&quot;, Float) = 0.001 \t\t_Color (&quot;Line Color&quot;, Color) = (1,1,1,1) \t\t_BumpMap (&quot;Normalmap&quot;, 2D) = &quot;bump&quot; {} \t} \t \tSubShader { \t\tLOD 300 \t\tZWrite On \t\tCull Off \t\t \t\tCGPROGRAM  \t\t#pragma target 2.0 \t\t#include &quot;UnityCG.cginc&quot; \t\t#pragma surface surf Lambert           \t\tsampler2D _MainTex; \t\tsampler2D _LineTexture; \t\tsampler2D _BumpMap; \t\tsampler2D _Mask; \t\tsampler2D _BackTexture; \t\thalf4 _Color; \t\thalf4 _MainColor; \t\tfloat _Range; \t\tfloat _LineSize; \t\t            \t\tstruct Input { \t\t\tfloat2 uv_MainTex; \t\t\tfloat2 uv_BumpMap;             float2 uv_Detail; \t\t};              \t\tvoid surf (Input IN, inout SurfaceOutput o) { \t\t\thalf4 c = tex2D (_MainTex, IN.uv_MainTex); \t\t\thalf4 m = tex2D (_Mask, IN.uv_MainTex); \t\t    half4 lc =  tex2D (_Mask, IN.uv_MainTex - _LineSize); \t\t    half4 lc2 = tex2D (_Mask, IN.uv_MainTex + _LineSize); \t\t\thalf4 lc3 = tex2D(_LineTexture, IN.uv_MainTex + _SinTime) * _Color;     \t\t\thalf4 bc  = tex2D(_BackTexture, IN.uv_MainTex); \t\t    o.Albedo = c *  _MainColor; \t\t    o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); \t\t     \t\t\tfloat factor = m.rgb.x + m.rgb.y + m.rgb.z; \t\t\tif(factor &gt;= _Range) \t\t\t{ \t\t\t   float factor2 = lc.rgb.x + lc.rgb.y + lc.rgb.z; \t\t\t   float factor3 = lc2.rgb.x + lc2.rgb.y + lc2.rgb.z; \t\t\t   if(factor2 &lt; _Range || factor3 &lt; _Range) \t\t\t   { \t\t\t      o.Albedo = lc3; \t\t\t   } \t\t\t   else \t\t\t   { \t\t\t      o.Albedo = bc; \t\t\t      o.Normal = float3(1,1,1); \t\t\t   }             } \t\t} \t\tENDCG \t}  \tFallback &quot;Diffuse&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u0430\u043b\u043e, \u043d\u043e \u0434\u0443\u043c\u0430\u044e \u0434\u0435\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e \u0438\u0441\u043a\u0443\u043f\u0430\u0435\u0442. \u0422\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438, \u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u0438\u0445 \u043d\u0438\u043c \u0440\u0430\u0437\u0431\u043e\u0440\u043e\u043c. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043a\u0430\u0442\u0430\u0442\u044c \u0432\u0430\u0442\u0443. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/HolyMonkey\/DissolveShader\/tree\/master\"> GitHub <\/a>    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/208532\/\"> http:\/\/habrahabr.ru\/post\/208532\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u043e\u0432\u044b\u043c \u0433\u043e\u0434\u043e\u043c, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0438 \u044f \u0438\u0437\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0448\u0435\u0439\u0434\u0435\u0440 \u0440\u0430\u0441\u0442\u0432\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430. 31 \u0434\u0435\u043a\u0430\u0431\u0440\u044f \u044f \u0435\u0433\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0447\u0442\u043e-\u0442\u043e \u0441 \u043d\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0430 \u0430\u0441\u0441\u0435\u0442 \u0441\u0442\u043e\u0440\u0435 \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u0447\u0442\u043e \u0432\u0441\u0451 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043d\u043e \u0443\u0436\u0435 \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0435\u0441\u0442\u044c, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u044d\u0442\u043e:<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/PaNYPZCGXZ4?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-208532","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/208532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=208532"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/208532\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=208532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=208532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=208532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}