{"id":297501,"date":"2020-01-22T15:00:19","date_gmt":"2020-01-22T15:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=297501"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=297501","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u043a\u043e\u0434\u043e\u043c \u0432 Unity LWRP"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/485018\/\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e (\u043f\u043e\u0447\u0442\u0438) \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 <b>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435<\/b> \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u0432 Unity \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <b>Lightweight Rendering Pipeline (LWRP)<\/b> \u2014 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 <b>Scriptable Rendering Pipeline (SRP)<\/b>.<\/p>\n<h4>\u0410 \u043a\u0430\u043a \u0436\u0435 Shader Graph?<\/h4>\n<p>  <b>Shader Graph<\/b> \u2014 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0440\u043e\u044e, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0435 \u0438 \u0432\u043e\u0442 \u0442\u043e\u0433\u0434\u0430 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0434, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u0443\u0431-\u0433\u0440\u0430\u0444\u043e\u0432 \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0442\u0447\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u0442\u0451\u0440\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u0431\u0430\u0440\u0434\u0430\u043a\u0435. \u0412\u0441\u0435 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0430\u043f\u0440\u0438\u043e\u0440\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u0437\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0438\u0431\u043e \u043b\u044e\u0431\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u043a\u0435 \u043d\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c. \u0411\u044b\u0432\u0430\u044e\u0442 \u0438 \u043b\u044e\u0434\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <b>\u043a\u043e\u0434\u043e\u043c<\/b>, \u0430 \u043d\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043d\u043e \u0441\u0443\u0442\u044c \u043e\u0434\u043d\u0430 \u2014 \u0434\u043e\u043b\u043e\u0439 \u043d\u043e\u0434\u044b, \u0434\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u0434!<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/yBwCvZz\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/n8HydYX\/2020-01-19-17-07-35.png\" alt=\"2020-01-19-17-07-35\"\/><\/a><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0432 \u0447\u0451\u043c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0435\u0441\u0442\u044c \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0448\u0435\u0439\u0434\u0435\u0440 \u043f\u043e\u0434 LWRP? \u0410 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0435 <b>Standard Surface Shader-\u044b<\/b> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 LWRP. <br \/>  \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/M8g31xz\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/8zmSxLy\/2020-01-19-17-16-16.png\" alt=\"2020-01-19-17-16-16\"\/><\/a> <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0448\u0435\u0439\u0434\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;Custom\/NewSurfaceShader&quot; {     Properties     {         _Color (&quot;Color&quot;, Color) = (1,1,1,1)         _MainTex (&quot;Albedo (RGB)&quot;, 2D) = &quot;white&quot; {}         _Glossiness (&quot;Smoothness&quot;, Range(0,1)) = 0.5         _Metallic (&quot;Metallic&quot;, Range(0,1)) = 0.0     }     SubShader     {         Tags { &quot;RenderType&quot;=&quot;Opaque&quot; }         LOD 200          CGPROGRAM         \/\/ Physically based Standard lighting model, and enable shadows on all light types         #pragma surface surf Standard fullforwardshadows          \/\/ Use shader model 3.0 target, to get nicer looking lighting         #pragma target 3.0          sampler2D _MainTex;          struct Input         {             float2 uv_MainTex;         };          half _Glossiness;         half _Metallic;         fixed4 _Color;          \/\/ Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.         \/\/ See https:\/\/docs.unity3d.com\/Manual\/GPUInstancing.html for more information about instancing.         \/\/ #pragma instancing_options assumeuniformscaling         UNITY_INSTANCING_BUFFER_START(Props)             \/\/ put more per-instance properties here         UNITY_INSTANCING_BUFFER_END(Props)          void surf (Input IN, inout SurfaceOutputStandard o)         {             \/\/ Albedo comes from a texture tinted by color             fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;             o.Albedo = c.rgb;             \/\/ Metallic and smoothness come from slider variables             o.Metallic = _Metallic;             o.Smoothness = _Glossiness;             o.Alpha = c.a;         }         ENDCG     }     FallBack &quot;Diffuse&quot; }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u043d\u0430 \u0443\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0430\u043d\u043b\u0438\u0442 \u0448\u0435\u0439\u0434\u0435\u0440 \u0441 \u0432\u0435\u0440\u0442\u0435\u043a\u0441\u043d\u043e\u0439 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e. \u0418 \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/28bLgkd\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/s5BDyVq\/2020-01-19-17-22-46.png\" alt=\"2020-01-19-17-22-46\"\/><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0448\u0435\u0439\u0434\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;Unlit\/NewUnlitShader&quot; {     Properties     {         _MainTex (&quot;Texture&quot;, 2D) = &quot;white&quot; {}     }     SubShader     {         Tags { &quot;RenderType&quot;=&quot;Opaque&quot; }         LOD 100          Pass         {             CGPROGRAM             #pragma vertex vert             #pragma fragment frag             \/\/ make fog work             #pragma multi_compile_fog              #include &quot;UnityCG.cginc&quot;              struct appdata             {                 float4 vertex : POSITION;                 float2 uv : TEXCOORD0;             };              struct v2f             {                 float2 uv : TEXCOORD0;                 UNITY_FOG_COORDS(1)                 float4 vertex : SV_POSITION;             };              sampler2D _MainTex;             float4 _MainTex_ST;              v2f vert (appdata v)             {                 v2f o;                 o.vertex = UnityObjectToClipPos(v.vertex);                 o.uv = TRANSFORM_TEX(v.uv, _MainTex);                 UNITY_TRANSFER_FOG(o,o.vertex);                 return o;             }              fixed4 frag (v2f i) : SV_Target             {                 \/\/ sample the texture                 fixed4 col = tex2D(_MainTex, i.uv);                 \/\/ apply fog                 UNITY_APPLY_FOG(i.fogCoord, col);                 return col;             }             ENDCG         }     } }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0430\u043a \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0433\u0440\u0443\u0441\u0442\u0438\u0442\u044c \u2014 \u043c\u044b \u0441\u043b\u043e\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0433\u043e\u043b\u044b\u043c\u0438 \u043d\u0430 \u043e\u0431\u043e\u0447\u0438\u043d\u0435 \u0431\u0435\u0437 \u0441\u0432\u0435\u0442\u0430, \u0442\u0435\u043d\u0435\u0439, \u043b\u0430\u0439\u0442\u043c\u0430\u043f \u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e <b>PBR<\/b>, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0436\u0438\u0437\u043d\u044c \u043d\u0435 \u043c\u0438\u043b\u0430.<br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0451 \u0440\u0443\u043a\u0430\u043c\u0438:<br \/>  <i> \u0414\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0442!<\/i><\/p>\n<p>  <a href=\"https:\/\/ibb.co\/b7xn2DT\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/7bHFRLP\/2020-01-19-17-55-56.png\" alt=\"2020-01-19-17-55-56\"\/><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0448\u0435\u0439\u0434\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;TheProxor\/Simple Lit&quot; {     Properties     {         _MainTex(&quot;Texture&quot;, 2D) = &quot;white&quot; {}     }      SubShader     {         Tags { &quot;RenderType&quot; = &quot;Opaque&quot; }         LOD 100          Pass         {              CGPROGRAM             #pragma vertex vert             #pragma fragment frag             \/\/ make fog work             #pragma multi_compile_fog              #include &quot;UnityCG.cginc&quot;              #include &quot;UnityLightingCommon.cginc&quot;               struct appdata             {                 float4 vertex : POSITION;                 float2 uv : TEXCOORD0;                 float3 normal : NORMAL;             };              struct v2f             {                 float2 uv : TEXCOORD0;                 UNITY_FOG_COORDS(1)                 float4 vertex : SV_POSITION;                 fixed4 diffuse : COLOR0;             };              sampler2D _MainTex;             float4 _MainTex_ST;              v2f vert(appdata v)             {                 v2f o;                 o.vertex = UnityObjectToClipPos(v.vertex);                 o.uv = TRANSFORM_TEX(v.uv, _MainTex);                 UNITY_TRANSFER_FOG(o,o.vertex);                 half3 worldNormal = UnityObjectToWorldNormal(v.normal);                 half nl = max(0, dot(worldNormal, _WorldSpaceLightPos0.xyz));                 o.diffuse = nl * _LightColor0;                 return o;             }              fixed4 frag(v2f i) : SV_Target             {                 \/\/ sample the texture                 fixed4 col = tex2D(_MainTex, i.uv);                \/\/ apply fog                UNITY_APPLY_FOG(i.fogCoord, col);                col *= i.diffuse;                return col;             }         ENDCG     }     } }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0434\u0438\u0444\u0443\u0437\u043d\u043e\u0435 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0435. \u0427\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435? \u041c\u043e\u0436\u043d\u043e \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u0441\u0451 \u0440\u0443\u043a\u0430\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u0434\u043e\u043b\u0433\u043e \u0438 \u043c\u0443\u0442\u043e\u0440\u043d\u043e, \u0434\u0430 \u0438 PBR \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u0432\u0441\u0435\u0445 \u0444\u0438\u0448\u0435\u043a LWRP \u043c\u044b \u043b\u0438\u0448\u0430\u0435\u043c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u043a \u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c LWRP, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u0438\u043c \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u044b\u043c \u0432\u0437\u043c\u0430\u0445\u043e\u043c \u0432\u0441\u0451 \u0432\u0435\u0440\u043d\u0443\u0442\u044c.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, LWRP \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 <i>Forward-\u0440\u0435\u043d\u0434\u0435\u0440\u0430<\/i>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 LitForwardPass-\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c CGInclude, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e. \u0412\u043e\u0442 \u0437\u0430 \u043d\u0438\u043c \u043c\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u0432 \u0432\u0435\u0441\u0451\u043b\u043e\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443:  <\/p>\n<blockquote><p><i>%localappdata%\\Unity\\cache\\packages\\packages.unity.com\\com.unity.render-pipelines.lightweight@(\u0432\u0435\u0440\u0441\u0438\u044f LWRP)\\<\/i><\/p><\/blockquote>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438\u0434\u044f \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0438 \u0437\u0430\u0439\u0434\u044f \u0432 \u043f\u0430\u043f\u043a\u0443 <i>Shaders<\/i> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0448\u0435\u0439\u0434\u0435\u0440, \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <b>Lit.shader<\/b>. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u043e\u0438\u0441\u043a\u0438 \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u044b, \u0432\u043e\u0442 \u043e\u043d \u2014 \u0437\u0430\u0432\u0435\u0442\u043d\u044b\u0439 \u0448\u0435\u0439\u0434\u0435\u0440. \u0417\u0430\u0439\u0434\u044f \u0432\u043d\u0443\u0442\u0440\u044c \u2014 \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Lit.shader<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">Shader &quot;Lightweight Render Pipeline\/Lit&quot; {     Properties     {         \/\/ Specular vs Metallic workflow         [HideInInspector] _WorkflowMode(&quot;WorkflowMode&quot;, Float) = 1.0                  [MainColor] _BaseColor(&quot;Color&quot;, Color) = (0.5,0.5,0.5,1)         [MainTexture] _BaseMap(&quot;Albedo&quot;, 2D) = &quot;white&quot; {}          _Cutoff(&quot;Alpha Cutoff&quot;, Range(0.0, 1.0)) = 0.5          _Smoothness(&quot;Smoothness&quot;, Range(0.0, 1.0)) = 0.5         _GlossMapScale(&quot;Smoothness Scale&quot;, Range(0.0, 1.0)) = 1.0         _SmoothnessTextureChannel(&quot;Smoothness texture channel&quot;, Float) = 0          [Gamma] _Metallic(&quot;Metallic&quot;, Range(0.0, 1.0)) = 0.0         _MetallicGlossMap(&quot;Metallic&quot;, 2D) = &quot;white&quot; {}          _SpecColor(&quot;Specular&quot;, Color) = (0.2, 0.2, 0.2)         _SpecGlossMap(&quot;Specular&quot;, 2D) = &quot;white&quot; {}          [ToggleOff] _SpecularHighlights(&quot;Specular Highlights&quot;, Float) = 1.0         [ToggleOff] _EnvironmentReflections(&quot;Environment Reflections&quot;, Float) = 1.0          _BumpScale(&quot;Scale&quot;, Float) = 1.0         _BumpMap(&quot;Normal Map&quot;, 2D) = &quot;bump&quot; {}          _OcclusionStrength(&quot;Strength&quot;, Range(0.0, 1.0)) = 1.0         _OcclusionMap(&quot;Occlusion&quot;, 2D) = &quot;white&quot; {}          _EmissionColor(&quot;Color&quot;, Color) = (0,0,0)         _EmissionMap(&quot;Emission&quot;, 2D) = &quot;white&quot; {}          \/\/ Blending state         [HideInInspector] _Surface(&quot;__surface&quot;, Float) = 0.0         [HideInInspector] _Blend(&quot;__blend&quot;, Float) = 0.0         [HideInInspector] _AlphaClip(&quot;__clip&quot;, Float) = 0.0         [HideInInspector] _SrcBlend(&quot;__src&quot;, Float) = 1.0         [HideInInspector] _DstBlend(&quot;__dst&quot;, Float) = 0.0         [HideInInspector] _ZWrite(&quot;__zw&quot;, Float) = 1.0         [HideInInspector] _Cull(&quot;__cull&quot;, Float) = 2.0          _ReceiveShadows(&quot;Receive Shadows&quot;, Float) = 1.0                 \/\/ Editmode props         [HideInInspector] _QueueOffset(&quot;Queue offset&quot;, Float) = 0.0                  \/\/ ObsoleteProperties         [HideInInspector] _MainTex(&quot;BaseMap&quot;, 2D) = &quot;white&quot; {}         [HideInInspector] _Color(&quot;Base Color&quot;, Color) = (0.5, 0.5, 0.5, 1)         [HideInInspector] _GlossMapScale(&quot;Smoothness&quot;, Float) = 0.0         [HideInInspector] _Glossiness(&quot;Smoothness&quot;, Float) = 0.0         [HideInInspector] _GlossyReflections(&quot;EnvironmentReflections&quot;, Float) = 0.0     }      SubShader     {         \/\/ Lightweight Pipeline tag is required. If Lightweight render pipeline is not set in the graphics settings         \/\/ this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this         \/\/ material work with both Lightweight Render Pipeline and Builtin Unity Pipeline         Tags{&quot;RenderType&quot; = &quot;Opaque&quot; &quot;RenderPipeline&quot; = &quot;LightweightPipeline&quot; &quot;IgnoreProjector&quot; = &quot;True&quot;}         LOD 300          \/\/ ------------------------------------------------------------------         \/\/  Forward pass. Shades all light in a single pass. GI + emission + Fog         Pass         {             \/\/ Lightmode matches the ShaderPassName set in LightweightRenderPipeline.cs. SRPDefaultUnlit and passes with             \/\/ no LightMode tag are also rendered by Lightweight Render Pipeline             Name &quot;ForwardLit&quot;             Tags{&quot;LightMode&quot; = &quot;LightweightForward&quot;}              Blend[_SrcBlend][_DstBlend]             ZWrite[_ZWrite]             Cull[_Cull]              HLSLPROGRAM             \/\/ Required to compile gles 2.0 with standard SRP library             \/\/ All shaders must be compiled with HLSLcc and currently only gles is not using HLSLcc by default             #pragma prefer_hlslcc gles             #pragma exclude_renderers d3d11_9x             #pragma target 2.0              \/\/ -------------------------------------             \/\/ Material Keywords             #pragma shader_feature _NORMALMAP             #pragma shader_feature _ALPHATEST_ON             #pragma shader_feature _ALPHAPREMULTIPLY_ON             #pragma shader_feature _EMISSION             #pragma shader_feature _METALLICSPECGLOSSMAP             #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A             #pragma shader_feature _OCCLUSIONMAP              #pragma shader_feature _SPECULARHIGHLIGHTS_OFF             #pragma shader_feature _ENVIRONMENTREFLECTIONS_OFF             #pragma shader_feature _SPECULAR_SETUP             #pragma shader_feature _RECEIVE_SHADOWS_OFF              \/\/ -------------------------------------             \/\/ Lightweight Pipeline keywords             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE             #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS             #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS             #pragma multi_compile _ _SHADOWS_SOFT             #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE              \/\/ -------------------------------------             \/\/ Unity defined keywords             #pragma multi_compile _ DIRLIGHTMAP_COMBINED             #pragma multi_compile _ LIGHTMAP_ON             #pragma multi_compile_fog              \/\/--------------------------------------             \/\/ GPU Instancing             #pragma multi_compile_instancing                          #pragma vertex LitPassVertex             #pragma fragment LitPassFragment              #include &quot;LitInput.hlsl&quot;             #include &quot;LitForwardPass.hlsl&quot;             ENDHLSL         }          Pass         {             Name &quot;ShadowCaster&quot;             Tags{&quot;LightMode&quot; = &quot;ShadowCaster&quot;}              ZWrite On             ZTest LEqual             Cull[_Cull]              HLSLPROGRAM             \/\/ Required to compile gles 2.0 with standard srp library             #pragma prefer_hlslcc gles             #pragma exclude_renderers d3d11_9x             #pragma target 2.0              \/\/ -------------------------------------             \/\/ Material Keywords             #pragma shader_feature _ALPHATEST_ON              \/\/--------------------------------------             \/\/ GPU Instancing             #pragma multi_compile_instancing             #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A              #pragma vertex ShadowPassVertex             #pragma fragment ShadowPassFragment              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;             #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/ShadowCasterPass.hlsl&quot;             ENDHLSL         }          Pass         {             Name &quot;DepthOnly&quot;             Tags{&quot;LightMode&quot; = &quot;DepthOnly&quot;}              ZWrite On             ColorMask 0             Cull[_Cull]              HLSLPROGRAM             \/\/ Required to compile gles 2.0 with standard srp library             #pragma prefer_hlslcc gles             #pragma exclude_renderers d3d11_9x             #pragma target 2.0              #pragma vertex DepthOnlyVertex             #pragma fragment DepthOnlyFragment              \/\/ -------------------------------------             \/\/ Material Keywords             #pragma shader_feature _ALPHATEST_ON             #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A              \/\/--------------------------------------             \/\/ GPU Instancing             #pragma multi_compile_instancing              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;             #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/DepthOnlyPass.hlsl&quot;             ENDHLSL         }          \/\/ This pass it not used during regular rendering, only for lightmap baking.         Pass         {             Name &quot;Meta&quot;             Tags{&quot;LightMode&quot; = &quot;Meta&quot;}              Cull Off              HLSLPROGRAM             \/\/ Required to compile gles 2.0 with standard srp library             #pragma prefer_hlslcc gles             #pragma exclude_renderers d3d11_9x              #pragma vertex LightweightVertexMeta             #pragma fragment LightweightFragmentMeta              #pragma shader_feature _SPECULAR_SETUP             #pragma shader_feature _EMISSION             #pragma shader_feature _METALLICSPECGLOSSMAP             #pragma shader_feature _ALPHATEST_ON             #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A              #pragma shader_feature _SPECGLOSSMAP              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;             #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitMetaPass.hlsl&quot;              ENDHLSL         }         Pass         {             Name &quot;Lightweight2D&quot;             Tags{ &quot;LightMode&quot; = &quot;Lightweight2D&quot; }              Blend[_SrcBlend][_DstBlend]             ZWrite[_ZWrite]             Cull[_Cull]              HLSLPROGRAM             \/\/ Required to compile gles 2.0 with standard srp library             #pragma prefer_hlslcc gles             #pragma exclude_renderers d3d11_9x              #pragma vertex vert             #pragma fragment frag             #pragma shader_feature _ALPHATEST_ON             #pragma shader_feature _ALPHAPREMULTIPLY_ON              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;             #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/Utils\/Lightweight2D.hlsl&quot;             ENDHLSL         }       }     FallBack &quot;Hidden\/InternalErrorShader&quot;     CustomEditor &quot;UnityEditor.Rendering.LWRP.ShaderGUI.LitShader&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 include-\u043e\u0432. \u041d\u0443 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0439 \u043b\u0430\u0434. <\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/LpxG3cD\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/PCcSdPs\/2020-01-19-18-28-13.png\" alt=\"2020-01-19-18-28-13\"\/><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0431\u0435\u0440-\u0448\u0435\u0439\u0434\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> Shader &quot;TheProxor\/LWRP\/Dissolve + Vertex Offset&quot; {             Properties             {                 \/\/ Specular vs Metallic workflow                 [HideInInspector] _WorkflowMode(&quot;WorkflowMode&quot;, Float) = 1.0                  [MainColor][HideInInspector] _BaseColor(&quot;Color&quot;, Color) = (0.5,0.5,0.5,1)                 [MainTexture][HideInInspector] _BaseMap(&quot;Albedo&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector]_Cutoff(&quot;Alpha Cutoff&quot;, Range(0.0, 1.0)) = 0.5                  [HideInInspector]_Smoothness(&quot;Smoothness&quot;, Range(0.0, 1.0)) = 0.5                 [HideInInspector]_GlossMapScale(&quot;Smoothness Scale&quot;, Range(0.0, 1.0)) = 1.0                 [HideInInspector]_SmoothnessTextureChannel(&quot;Smoothness texture channel&quot;, Float) = 0                  [Gamma][HideInInspector] _Metallic(&quot;Metallic&quot;, Range(0.0, 1.0)) = 0.0                 [HideInInspector]_MetallicGlossMap(&quot;Metallic&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector]_SpecColor(&quot;Specular&quot;, Color) = (0.2, 0.2, 0.2)                 [HideInInspector]_SpecGlossMap(&quot;Specular&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector][ToggleOff] _SpecularHighlights(&quot;Specular Highlights&quot;, Float) = 1.0                 [HideInInspector][ToggleOff] _EnvironmentReflections(&quot;Environment Reflections&quot;, Float) = 1.0                  [HideInInspector]_BumpScale(&quot;Scale&quot;, Float) = 1.0                 [HideInInspector]_BumpMap(&quot;Normal Map&quot;, 2D) = &quot;bump&quot; {}                  [HideInInspector]_OcclusionStrength(&quot;Strength&quot;, Range(0.0, 1.0)) = 1.0                 [HideInInspector]_OcclusionMap(&quot;Occlusion&quot;, 2D) = &quot;white&quot; {}                  [HDR][HideInInspector]_EmissionColor(&quot;Color&quot;, Color) = (0,0,0)                 [HideInInspector]_EmissionMap(&quot;Emission&quot;, 2D) = &quot;white&quot; {}                  \/\/ Blending state                 [HideInInspector] _Surface(&quot;__surface&quot;, Float) = 0.0                 [HideInInspector] _Blend(&quot;__blend&quot;, Float) = 0.0                 [HideInInspector] _AlphaClip(&quot;__clip&quot;, Float) = 0.0                 [HideInInspector] _SrcBlend(&quot;__src&quot;, Float) = 1.0                 [HideInInspector] _DstBlend(&quot;__dst&quot;, Float) = 0.0                 [HideInInspector] _ZWrite(&quot;__zw&quot;, Float) = 1.0                 [HideInInspector] _Cull(&quot;__cull&quot;, Float) = 2.0                  [HideInInspector]_ReceiveShadows(&quot;Receive Shadows&quot;, Float) = 1.0                 \/\/ Editmode props                 [HideInInspector] _QueueOffset(&quot;Queue offset&quot;, Float) = 0.0                  \/\/ ObsoleteProperties                 [HideInInspector] _MainTex(&quot;BaseMap&quot;, 2D) = &quot;white&quot; {}                 [HideInInspector] _Color(&quot;Base Color&quot;, Color) = (0.5, 0.5, 0.5, 1)                 [HideInInspector] _GlossMapScale(&quot;Smoothness&quot;, Float) = 0.0                 [HideInInspector] _Glossiness(&quot;Smoothness&quot;, Float) = 0.0                 [HideInInspector] _GlossyReflections(&quot;EnvironmentReflections&quot;, Float) = 0.0                                    \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430 \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u0441\u044b                 _DissolveMap(&quot;Dissolve Map&quot;, 2D) = &quot;white&quot; {}                 _DissolveFactor(&quot;Dissolve Factor&quot;, Range(0, 1)) = 0.0                 _DissolveWidth(&quot;Dissolve Width&quot;, Range(0, 1)) = 0.0                 [HDR]_DissolveColor(&quot;Color&quot;, Color) = (1,1,0)             }              SubShader             {                 \/\/ Lightweight Pipeline tag is required. If Lightweight render pipeline is not set in the graphics settings                 \/\/ this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this                 \/\/ material work with both Lightweight Render Pipeline and Builtin Unity Pipeline                 Tags{&quot;RenderType&quot; = &quot;Opaque&quot; &quot;RenderPipeline&quot; = &quot;LightweightPipeline&quot; &quot;IgnoreProjector&quot; = &quot;True&quot;}                 LOD 300                  \/\/ ------------------------------------------------------------------                 \/\/  Forward pass. Shades all light in a single pass. GI + emission + Fog                 Pass                 {                 \/\/ Lightmode matches the ShaderPassName set in LightweightRenderPipeline.cs. SRPDefaultUnlit and passes with                 \/\/ no LightMode tag are also rendered by Lightweight Render Pipeline                 Name &quot;ForwardLit&quot;                 Tags{&quot;LightMode&quot; = &quot;LightweightForward&quot;}                  Blend[_SrcBlend][_DstBlend]                 ZWrite[_ZWrite]                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard SRP library                 \/\/ All shaders must be compiled with HLSLcc and currently only gles is not using HLSLcc by default                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _NORMALMAP                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ALPHAPREMULTIPLY_ON                 #pragma shader_feature _EMISSION                 #pragma shader_feature _METALLICSPECGLOSSMAP                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                 #pragma shader_feature _OCCLUSIONMAP                  #pragma shader_feature _SPECULARHIGHLIGHTS_OFF                 #pragma shader_feature _ENVIRONMENTREFLECTIONS_OFF                 #pragma shader_feature _SPECULAR_SETUP                 #pragma shader_feature _RECEIVE_SHADOWS_OFF                  \/\/ -------------------------------------                 \/\/ Lightweight Pipeline keywords                 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS                 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE                 #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS                 #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS                 #pragma multi_compile _ _SHADOWS_SOFT                 #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE                  \/\/ -------------------------------------                 \/\/ Unity defined keywords                 #pragma multi_compile _ DIRLIGHTMAP_COMBINED                 #pragma multi_compile _ LIGHTMAP_ON                 #pragma multi_compile_fog                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                  #pragma vertex LitPassVertex                 #pragma fragment LitPassFragment                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Lighting.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.core\/ShaderLibrary\/CommonMaterial.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/SurfaceInput.hlsl&quot;                  #ifdef _SPECULAR_SETUP                     #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, uv)                 #else                     #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_MetallicGlossMap, sampler_MetallicGlossMap, uv)                 #endif                    struct Attributes                 {                     float4 positionOS   : POSITION;                     float3 normalOS     : NORMAL;                     float4 tangentOS    : TANGENT;                     float2 texcoord     : TEXCOORD0;                     float2 lightmapUV   : TEXCOORD1;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv                       : TEXCOORD0;                     DECLARE_LIGHTMAP_OR_SH(lightmapUV, vertexSH, 1);                  #ifdef _ADDITIONAL_LIGHTS                     float3 positionWS               : TEXCOORD2;                 #endif                  #ifdef _NORMALMAP                     half4 normalWS                  : TEXCOORD3;    \/\/ xyz: normal, w: viewDir.x                     half4 tangentWS                 : TEXCOORD4;    \/\/ xyz: tangent, w: viewDir.y                     half4 bitangentWS                : TEXCOORD5;    \/\/ xyz: bitangent, w: viewDir.z                 #else                     half3 normalWS                  : TEXCOORD3;                     half3 viewDirWS                 : TEXCOORD4;                 #endif                      half4 fogFactorAndVertexLight   : TEXCOORD6; \/\/ x: fogFactor, yzw: vertex light                  #ifdef _MAIN_LIGHT_SHADOWS                     float4 shadowCoord              : TEXCOORD7;                 #endif                      float4 positionCS               : SV_POSITION;                     UNITY_VERTEX_INPUT_INSTANCE_ID                     UNITY_VERTEX_OUTPUT_STEREO                       float3 uvDissolve\t\t\t    : TEXCOORD8;                  };                   CBUFFER_START(UnityPerMaterial)                     float4 _BaseMap_ST;                     half4 _BaseColor;                     half4 _SpecColor;                     half4 _EmissionColor;                     half _Cutoff;                     half _Smoothness;                     half _Metallic;                     half _BumpScale;                     half _OcclusionStrength;                     float4 _DissolveMap_ST; \/\/\u0422\u0430\u0439\u043b\u0438\u043d\u0433 \u0438 \u043e\u0444\u0444\u0441\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b _DissolveMap                     float _DissolveFactor;                     float _DissolveWidth;                     float4 _DissolveColor;                 CBUFFER_END                  TEXTURE2D(_OcclusionMap);       SAMPLER(sampler_OcclusionMap);                 TEXTURE2D(_MetallicGlossMap);   SAMPLER(sampler_MetallicGlossMap);                 TEXTURE2D(_SpecGlossMap);       SAMPLER(sampler_SpecGlossMap);                 TEXTURE2D(_DissolveMap);        SAMPLER(sampler_DissolveMap);                   half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha)                 {                     half4 specGloss;                      #ifdef _METALLICSPECGLOSSMAP                     specGloss = SAMPLE_METALLICSPECULAR(uv);                     #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                     specGloss.a = albedoAlpha * _Smoothness;                     #else                     specGloss.a *= _Smoothness;                     #endif                     #else \/\/ _METALLICSPECGLOSSMAP                     #if _SPECULAR_SETUP                     specGloss.rgb = _SpecColor.rgb;                     #else                     specGloss.rgb = _Metallic.rrr;                     #endif                      #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                     specGloss.a = albedoAlpha * _Smoothness;                     #else                     specGloss.a = _Smoothness;                     #endif                     #endif                      return specGloss;                 }                  half SampleOcclusion(float2 uv)                 {                     #ifdef _OCCLUSIONMAP                     \/\/ TODO: Controls things like these by exposing SHADER_QUALITY levels (low, medium, high)                     #if defined(SHADER_API_GLES)                     return SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;                     #else                     half occ = SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;                     return LerpWhiteTo(occ, _OcclusionStrength);                     #endif                     #else                     return 1.0;                     #endif                 }                  inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfaceData)                 {                     half4 albedoAlpha = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv);                    \/\/ half4 albedoAlpha = SampleAlbedoAlpha(uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap));                     outSurfaceData.alpha = Alpha(albedoAlpha.a, _BaseColor, _Cutoff);                      half4 specGloss = SampleMetallicSpecGloss(uv, albedoAlpha.a);                     outSurfaceData.albedo = albedoAlpha.rgb * _BaseColor.rgb;                      #if _SPECULAR_SETUP                     outSurfaceData.metallic = 1.0h;                     outSurfaceData.specular = specGloss.rgb;                     #else                     outSurfaceData.metallic = specGloss.r;                     outSurfaceData.specular = half3(0.0h, 0.0h, 0.0h);                     #endif                      outSurfaceData.smoothness = specGloss.a;                     outSurfaceData.normalTS = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale);                     outSurfaceData.occlusion = SampleOcclusion(uv);                     outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap));                    \/\/ outSurfaceData.emission = _EmissionColor.rgb * SAMPLE_TEXTURE2D(_EmissionMap, sampler_EmissionMap, uv);                 }                  void InitializeInputData(Varyings input, half3 normalTS, out InputData inputData)                 {                     inputData = (InputData)0;                  #ifdef _ADDITIONAL_LIGHTS                     inputData.positionWS = input.positionWS;                 #endif                  #ifdef _NORMALMAP                     half3 viewDirWS = half3(input.normalWS.w, input.tangentWS.w, input.bitangentWS.w);                     inputData.normalWS = TransformTangentToWorld(normalTS,                         half3x3(input.tangentWS.xyz, input.bitangentWS.xyz, input.normalWS.xyz));                 #else                     half3 viewDirWS = input.viewDirWS;                     inputData.normalWS = input.normalWS;                 #endif                      inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);                     viewDirWS = SafeNormalize(viewDirWS);                      inputData.viewDirectionWS = viewDirWS;                 #if defined(_MAIN_LIGHT_SHADOWS) && !defined(_RECEIVE_SHADOWS_OFF)                     inputData.shadowCoord = input.shadowCoord;                 #else                     inputData.shadowCoord = float4(0, 0, 0, 0);                 #endif                     inputData.fogCoord = input.fogFactorAndVertexLight.x;                     inputData.vertexLighting = input.fogFactorAndVertexLight.yzw;                     inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.vertexSH, inputData.normalWS);                 }                  \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/                 \/\/                  Vertex and Fragment functions                            \/\/                 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/                  \/\/Standard (Physically Based) shader                 Varyings LitPassVertex(Attributes input)                 {                     Varyings output = (Varyings)0;                       UNITY_SETUP_INSTANCE_ID(input);                     UNITY_TRANSFER_INSTANCE_ID(input, output);                     UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);                       input.positionOS.xyz += normalize(input.positionOS.xyz) * sin(input.positionOS.x) * sin(_Time.x * 100);                      VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);                     VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS);                     half3 viewDirWS = GetCameraPositionWS() - vertexInput.positionWS;                     half3 vertexLight = VertexLighting(vertexInput.positionWS, normalInput.normalWS);                     half fogFactor = ComputeFogFactor(vertexInput.positionCS.z);                      output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                  #ifdef _NORMALMAP                     output.normalWS = half4(normalInput.normalWS, viewDirWS.x);                     output.tangentWS = half4(normalInput.tangentWS, viewDirWS.y);                     output.bitangentWS = half4(normalInput.bitangentWS, viewDirWS.z);                 #else                     output.normalWS = NormalizeNormalPerVertex(normalInput.normalWS);                     output.viewDirWS = viewDirWS;                 #endif                      OUTPUT_LIGHTMAP_UV(input.lightmapUV, unity_LightmapST, output.lightmapUV);                     OUTPUT_SH(output.normalWS.xyz, output.vertexSH);                      output.fogFactorAndVertexLight = half4(fogFactor, vertexLight);                  #ifdef _ADDITIONAL_LIGHTS                     output.positionWS = vertexInput.positionWS;                 #endif                  #if defined(_MAIN_LIGHT_SHADOWS) && !defined(_RECEIVE_SHADOWS_OFF)                     output.shadowCoord = GetShadowCoord(vertexInput);                 #endif                      output.positionCS = vertexInput.positionCS;                      return output;                 }                  \/\/ Used in Standard (Physically Based) shader                 half4 LitPassFragment(Varyings input) : SV_Target                 {                     input.uv += _Time.x * 10;                     UNITY_SETUP_INSTANCE_ID(input);                     UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);                      SurfaceData surfaceData;                     InitializeStandardLitSurfaceData(input.uv, surfaceData);                      InputData inputData;                     InitializeInputData(input, surfaceData.normalTS, inputData);                                          float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);                      if (mask.r &gt; _DissolveFactor)                         discard;                      bool outline = mask.r &gt; _DissolveFactor - _DissolveWidth;                     surfaceData.emission *= outline * _DissolveColor;                     half4 color = LightweightFragmentPBR(inputData, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha);                     color *= lerp(1, _DissolveColor, outline);                      color.rgb = MixFog(color.rgb, inputData.fogCoord);                                          return color;                 }                 ENDHLSL             }              \/\/\u0442\u0435\u043d\u0438             Pass             {                 Name &quot;ShadowCaster&quot;                 Tags{&quot;LightMode&quot; = &quot;ShadowCaster&quot;}                  ZWrite On                 ZTest LEqual                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _ALPHATEST_ON                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  #pragma vertex ShadowPassVertex                 #pragma fragment ShadowPassFragment                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Shadows.hlsl&quot;                  float3 _LightDirection;                  struct Attributes                 {                     float4 positionOS   : POSITION;                     float3 normalOS     : NORMAL;                     float2 texcoord     : TEXCOORD0;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv           : TEXCOORD0;                     float4 positionCS   : SV_POSITION;                 };                  CBUFFER_START(UnityPerMaterial)                     float4 _DissolveMap_ST; \/\/\u0422\u0430\u0439\u043b\u0438\u043d\u0433 \u0438 \u043e\u0444\u0444\u0441\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b _DissolveMap                     float _DissolveFactor;                 CBUFFER_END                  TEXTURE2D(_DissolveMap);        SAMPLER(sampler_DissolveMap);                  float4 GetShadowPositionHClip(Attributes input)                 {                     float3 positionWS = TransformObjectToWorld(input.positionOS.xyz);                     float3 normalWS = TransformObjectToWorldNormal(input.normalOS);                      float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, _LightDirection));                  #if UNITY_REVERSED_Z                     positionCS.z = min(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE);                 #else                     positionCS.z = max(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE);                 #endif                      return positionCS;                 }                  Varyings ShadowPassVertex(Attributes input)                 {                     Varyings output;                     input.positionOS.xyz += normalize(input.positionOS.xyz) * sin(input.positionOS.x) * sin(_Time.x * 100);                     UNITY_SETUP_INSTANCE_ID(input);                     output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                     output.positionCS = GetShadowPositionHClip(input);                     return output;                 }                  half4 ShadowPassFragment(Varyings input) : SV_TARGET                 {                      float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);                       if (mask.r &gt; _DissolveFactor)                          discard;                      Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff);                     return 0;                 }                  ENDHLSL             }              Pass             {                 Name &quot;DepthOnly&quot;                 Tags{&quot;LightMode&quot; = &quot;DepthOnly&quot;}                  ZWrite On                 ColorMask 0                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  #pragma vertex DepthOnlyVertex                 #pragma fragment DepthOnlyFragment                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                  #ifndef LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED                 #define LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED                  struct Attributes                 {                     float4 position     : POSITION;                     float2 texcoord     : TEXCOORD0;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv           : TEXCOORD0;                     float4 positionCS   : SV_POSITION;                     UNITY_VERTEX_INPUT_INSTANCE_ID                     UNITY_VERTEX_OUTPUT_STEREO                 };                  Varyings DepthOnlyVertex(Attributes input)                 {                     Varyings output = (Varyings)0;                     UNITY_SETUP_INSTANCE_ID(input);                     UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);                      input.position.xyz += normalize(input.position.xyz) * sin(input.position.x) * sin(_Time.x * 100);                      output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                     output.positionCS = TransformObjectToHClip(input.position.xyz);                     return output;                 }                  half4 DepthOnlyFragment(Varyings input) : SV_TARGET                 {                     UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);                      Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff);                     return 0;                 }                 #endif                  ENDHLSL             }              \/\/\u043b\u0430\u0439\u0442\u043c\u0430\u043f\u044b             Pass             {                 Name &quot;Meta&quot;                 Tags{&quot;LightMode&quot; = &quot;Meta&quot;}                  Cull Off                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                  #pragma vertex LightweightVertexMeta                 #pragma fragment LightweightFragmentMeta                  #pragma shader_feature _SPECULAR_SETUP                 #pragma shader_feature _EMISSION                 #pragma shader_feature _METALLICSPECGLOSSMAP                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  #pragma shader_feature _SPECGLOSSMAP                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/MetaInput.hlsl&quot;                  #ifndef LIGHTWEIGHT_LIT_META_PASS_INCLUDED                 #define LIGHTWEIGHT_LIT_META_PASS_INCLUDED                    Varyings LightweightVertexMeta(Attributes input)                 {                     Varyings output;                     output.positionCS = MetaVertexPosition(input.positionOS, input.uv1, input.uv2,                         unity_LightmapST, unity_DynamicLightmapST);                     output.uv = TRANSFORM_TEX(input.uv0, _BaseMap);                     return output;                 }                  half4 LightweightFragmentMeta(Varyings input) : SV_Target                 {                     SurfaceData surfaceData;                     InitializeStandardLitSurfaceData(input.uv, surfaceData);                      BRDFData brdfData;                     InitializeBRDFData(surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.alpha, brdfData);                      MetaInput metaInput;                     metaInput.Albedo = brdfData.diffuse + brdfData.specular * brdfData.roughness * 0.5;                     metaInput.SpecularColor = surfaceData.specular;                     metaInput.Emission = surfaceData.emission;                      return MetaFragment(metaInput);                 }                 #endif                 ENDHLSL             }              Pass             {                 Name &quot;Lightweight2D&quot;                 Tags{ &quot;LightMode&quot; = &quot;Lightweight2D&quot; }                  Blend[_SrcBlend][_DstBlend]                 ZWrite[_ZWrite]                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                  #pragma vertex vert                 #pragma fragment frag                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ALPHAPREMULTIPLY_ON                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/Utils\/Lightweight2D.hlsl&quot;                 ENDHLSL             }               }                 FallBack &quot;Hidden\/InternalErrorShader&quot;                 CustomEditor &quot;UnityEditor.Rendering.LWRP.ShaderGUI.LitShaderEditor&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0447\u0442\u043e \u043a \u0447\u0435\u043c\u0443 \u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u0448\u0435\u0439\u0434\u0435\u0440\u0435. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u0442\u0440\u043e\u0447\u043a\u0430:<\/p>\n<pre><code class=\"cpp\">CustomEditor &quot;UnityEditor.Rendering.LWRP.ShaderGUI.LitShaderEditor&quot;<\/code><\/pre>\n<p>  \u041a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">CustomEditor &quot;UnityEditor.Rendering.LWRP.ShaderGUI.LitShader&quot;<\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0436\u0435 \u044d\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e? \u041e\u0442\u0432\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442 \u2014 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u0441\u044f, \u0432 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0435\u0444\u0430\u0439\u043d\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0440\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430 \u044d\u0442\u043e, \u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u043e\u0447\u043a\u0443, \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u0434\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u0448 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438, \u043d\u043e \u0438 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0432\u043e\u0438\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u0430\u0445. \u0423 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u0430 \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0442\u043e\u043f\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u0442\u0438:  <\/p>\n<blockquote><p><i>%localappdata%\\Unity\\cache\\packages\\packages.unity.com\\com.unity.render-pipelines.lightweight@6.9.2\\Editor\\ShaderGUI\\Shaders\\<\/i><\/p><\/blockquote>\n<p> \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0444\u0430\u0439\u043b LitShader.cs, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043e\u0442 BaseShaderGUI:<\/p>\n<pre><code class=\"cs\">internal class LitShader : BaseShaderGUI { ... }<\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438 \u0432 BaseShaderGUI.cs, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u044b\u0448\u0435: <\/p>\n<pre><code class=\"cs\">public abstract class BaseShaderGUI : ShaderGUI { ... } <\/code><\/pre>\n<p>  \u0411\u0435\u0440\u0451\u043c \u044d\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u043a\u0438\u0434\u0430\u0435\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 <b>Editor<\/b> (\u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0442 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u0438\u043b\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0451\u043d UnityEditor \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443 \u0431\u0438\u043b\u0434\u0430). \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0430 \u043d\u0430\u0448\u0443 \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u0430\u043b\u0438\u0442\u0441\u044f \u0442\u044b\u0441\u044f\u0447\u0430 \u0438 \u043e\u0434\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u043b-\u0442\u0438\u043f\u043e\u043c <b>SavedBool<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u0443\u044e \u0432 \u043e\u043a\u043d\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 bool. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441\u0432\u0451\u0440\u043d\u0443\u0442\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043d\u0435\u0445\u0438\u0442\u0440\u0443\u044e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u044e.<\/p>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"cs\">SavedBool m_SurfaceOptionsFoldout; SavedBool m_SurfaceInputsFoldout; SavedBool m_AdvancedFoldout; <\/code><\/pre>\n<p>  \u041d\u0430:<\/p>\n<pre><code class=\"cs\">AnimatedValues.AnimBool m_SurfaceOptionsFoldout; AnimatedValues.AnimBool m_SurfaceInputsFoldout; AnimatedValues.AnimBool m_AdvancedFoldout; <\/code><\/pre>\n<p>  \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u0441\u043e\u0432:<\/p>\n<pre><code class=\"cs\">AnimatedValues.AnimBool m_OtherFoldout; <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0441 \u043d\u0430\u0448\u0438\u043c\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044f \u0441\u043b\u043e\u0436\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430: <\/p>\n<pre><code class=\"cs\">protected class Styles {     \/\/ Catergories           ...     public static readonly GUIContent OtherOptions =      new GUIContent(&quot;Your own options&quot;, &quot;You own custom options&quot;); } <\/code><\/pre>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043d\u0451\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u043e\u043a\u0443\u0441. \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0443 \u0432\u0441\u0435\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u0441\u043e\u0432 \u044f \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <b>HideInInspector<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0432\u043e\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0440\u044b\u0442 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u0430 \u0443 \u043d\u0430\u0441 \u043a\u0430\u043a\u043e\u0439? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439! \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u0441\u044b \u043e\u0442\u0440\u0438\u0441\u0443\u044e\u0442\u0441\u044f \u043f\u043e-\u043b\u044e\u0431\u043e\u043c\u0443. \u0412\u043e\u0442 \u0438 \u0441\u043a\u0440\u043e\u0435\u043c \u0438\u0445:<\/p>\n<pre><code class=\"cpp\"> ... [MainColor][HideInInspector] _BaseColor(&quot;Color&quot;, Color) = (0.5,0.5,0.5,1) [MainTexture][HideInInspector] _BaseMap(&quot;Albedo&quot;, 2D) = &quot;white&quot; {} [HideInInspector]_Cutoff(&quot;Alpha Cutoff&quot;, Range(0.0, 1.0)) = 0.5 [HideInInspector]_Smoothness(&quot;Smoothness&quot;, Range(0.0, 1.0)) = 0.5 [HideInInspector]_GlossMapScale(&quot;Smoothness Scale&quot;, Range(0.0, 1.0)) = 1.0 [HideInInspector]_SmoothnessTextureChannel(&quot;Smoothness texture channel&quot;, Float) = 0 ... <\/code><\/pre>\n<p>  \u0410 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0434\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"cs\">public override void OnGUI(...) {    ...    m_OtherFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(m_OtherFoldout.value, Styles.OtherOptions);    if (m_OtherFoldout.value)    {          base.OnGUI(materialEditorIn, properties);          EditorGUILayout.Space();    }    EditorGUILayout.EndFoldoutHeaderGroup();                ... } <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u043b\u0438\u0446\u043e:<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/wz3FT1X\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/Js0wNP4\/2020-01-19-22-58-23.png\" alt=\"2020-01-19-22-58-23\"\/><\/a><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0438 \u043a\u043e\u0434 \u043e\u0431\u043e\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">BaseShaderEditor.cs<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using UnityEngine; using UnityEngine.Rendering; using UnityEditor.Rendering;  namespace UnityEditor {     public abstract class BaseShaderEditor : ShaderGUI     {         #region EnumsAndClasses          public enum SurfaceType         {             Opaque,             Transparent         }          public enum BlendMode         {             Alpha,   \/\/ Old school alpha-blending mode, fresnel does not affect amount of transparency             Premultiply, \/\/ Physically plausible transparency mode, implemented as alpha pre-multiply             Additive,             Multiply         }          public enum SmoothnessSource         {             BaseAlpha,             SpecularAlpha         }          public enum RenderFace         {             Front = 2,             Back = 1,             Both = 0         }          protected class Styles         {             \/\/ Catergories             public static readonly GUIContent SurfaceOptions =                 new GUIContent(&quot;Surface Options&quot;, &quot;Controls how LWRP renders the Material on a screen.&quot;);              public static readonly GUIContent SurfaceInputs = new GUIContent(&quot;Surface Inputs&quot;,                 &quot;These settings describe the look and feel of the surface itself.&quot;);              public static readonly GUIContent AdvancedLabel = new GUIContent(&quot;Advanced&quot;,                 &quot;These settings affect behind-the-scenes rendering and underlying calculations.&quot;);              public static readonly GUIContent surfaceType = new GUIContent(&quot;Surface Type&quot;,                 &quot;Select a surface type for your texture. Choose between Opaque or Transparent.&quot;);              public static readonly GUIContent blendingMode = new GUIContent(&quot;Blending Mode&quot;,                 &quot;Controls how the color of the Transparent surface blends with the Material color in the background.&quot;);              public static readonly GUIContent cullingText = new GUIContent(&quot;Render Face&quot;,                 &quot;Specifies which faces to cull from your geometry. Front culls front faces. Back culls backfaces. None means that both sides are rendered.&quot;);              public static readonly GUIContent alphaClipText = new GUIContent(&quot;Alpha Clipping&quot;,                 &quot;Makes your Material act like a Cutout shader. Use this to create a transparent effect with hard edges between opaque and transparent areas.&quot;);              public static readonly GUIContent alphaClipThresholdText = new GUIContent(&quot;Threshold&quot;,                 &quot;Sets where the Alpha Clipping starts. The higher the value is, the brighter the  effect is when clipping starts.&quot;);              public static readonly GUIContent receiveShadowText = new GUIContent(&quot;Receive Shadows&quot;,                 &quot;When enabled, other GameObjects can cast shadows onto this GameObject.&quot;);              public static readonly GUIContent baseMap = new GUIContent(&quot;Base Map&quot;,                 &quot;Specifies the base Material and\/or Color of the surface. If you\u2019ve selected Transparent or Alpha Clipping under Surface Options, your Material uses the Texture\u2019s alpha channel or color.&quot;);              public static readonly GUIContent emissionMap = new GUIContent(&quot;Emission Map&quot;,                 &quot;Sets a Texture map to use for emission. You can also select a color with the color picker. Colors are multiplied over the Texture.&quot;);              public static readonly GUIContent normalMapText =                 new GUIContent(&quot;Normal Map&quot;, &quot;Assigns a tangent-space normal map.&quot;);              public static readonly GUIContent bumpScaleNotSupported =                 new GUIContent(&quot;Bump scale is not supported on mobile platforms&quot;);              public static readonly GUIContent fixNormalNow = new GUIContent(&quot;Fix now&quot;,                 &quot;Converts the assigned texture to be a normal map format.&quot;);              public static readonly GUIContent queueSlider = new GUIContent(&quot;Priority&quot;,                 &quot;Determines the chronological rendering order for a Material. High values are rendered first.&quot;);              public static readonly GUIContent OtherOptions =                 new GUIContent(&quot;Your own options&quot;, &quot;You own custom options&quot;);         }          #endregion          #region Variables          protected MaterialEditor materialEditor { get; set; }          protected MaterialProperty surfaceTypeProp { get; set; }          protected MaterialProperty blendModeProp { get; set; }          protected MaterialProperty cullingProp { get; set; }          protected MaterialProperty alphaClipProp { get; set; }          protected MaterialProperty alphaCutoffProp { get; set; }          protected MaterialProperty receiveShadowsProp { get; set; }          \/\/ Common Surface Input properties          protected MaterialProperty baseMapProp { get; set; }          protected MaterialProperty baseColorProp { get; set; }          protected MaterialProperty emissionMapProp { get; set; }          protected MaterialProperty emissionColorProp { get; set; }          protected MaterialProperty queueOffsetProp { get; set; }          public bool m_FirstTimeApply = true;          private const string k_KeyPrefix = &quot;LightweightRP:Material:UI_State:&quot;;          private string m_HeaderStateKey = null;          \/\/ Header foldout states          AnimatedValues.AnimBool m_SurfaceOptionsFoldout;          AnimatedValues.AnimBool m_SurfaceInputsFoldout;          AnimatedValues.AnimBool m_AdvancedFoldout;          AnimatedValues.AnimBool m_OtherFoldout;          #endregion          private const int queueOffsetRange = 50;         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         \/\/ General Functions              \/\/         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         #region GeneralFunctions          public abstract void MaterialChanged(Material material);          public virtual void FindProperties(MaterialProperty[] properties)         {             surfaceTypeProp = FindProperty(&quot;_Surface&quot;, properties);             blendModeProp = FindProperty(&quot;_Blend&quot;, properties);             cullingProp = FindProperty(&quot;_Cull&quot;, properties);             alphaClipProp = FindProperty(&quot;_AlphaClip&quot;, properties);             alphaCutoffProp = FindProperty(&quot;_Cutoff&quot;, properties);             receiveShadowsProp = FindProperty(&quot;_ReceiveShadows&quot;, properties, false);             baseMapProp = FindProperty(&quot;_BaseMap&quot;, properties, false);             baseColorProp = FindProperty(&quot;_BaseColor&quot;, properties, false);             emissionMapProp = FindProperty(&quot;_EmissionMap&quot;, properties, false);             emissionColorProp = FindProperty(&quot;_EmissionColor&quot;, properties, false);             queueOffsetProp = FindProperty(&quot;_QueueOffset&quot;, properties, false);         }          public override void OnGUI(MaterialEditor materialEditorIn, MaterialProperty[] properties)         {             if (materialEditorIn == null)                 throw new ArgumentNullException(&quot;materialEditorIn&quot;);              FindProperties(properties); \/\/ MaterialProperties can be animated so we do not cache them but fetch them every event to ensure animated values are updated correctly             materialEditor = materialEditorIn;             Material material = materialEditor.target as Material;              \/\/ Make sure that needed setup (ie keywords\/renderqueue) are set up if we're switching some existing             \/\/ material to a lightweight shader.             if (m_FirstTimeApply)             {                 OnOpenGUI(material, materialEditorIn);                 m_FirstTimeApply = false;             }              ShaderPropertiesGUI(material);              m_OtherFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(m_OtherFoldout.value, Styles.OtherOptions);             if (m_OtherFoldout.value)             {                 base.OnGUI(materialEditorIn, properties);                 EditorGUILayout.Space();             }             EditorGUILayout.EndFoldoutHeaderGroup();                          foreach (var obj in materialEditor.targets)                 MaterialChanged((Material)obj);         }           public virtual void OnOpenGUI(Material material, MaterialEditor materialEditor)         {             \/\/ Foldout states             m_HeaderStateKey = k_KeyPrefix + material.shader.name; \/\/ Create key string for editor prefs             m_SurfaceOptionsFoldout = new AnimatedValues.AnimBool(true);             m_SurfaceInputsFoldout = new AnimatedValues.AnimBool(true);             m_AdvancedFoldout = new AnimatedValues.AnimBool(true);             m_OtherFoldout = new AnimatedValues.AnimBool(true);              foreach (var obj in materialEditor.targets)                 MaterialChanged((Material)obj);         }          public void ShaderPropertiesGUI(Material material)         {             if (material == null)                 throw new ArgumentNullException(&quot;material&quot;);              EditorGUI.BeginChangeCheck();              m_SurfaceOptionsFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(m_SurfaceOptionsFoldout.value, Styles.SurfaceOptions);             if (m_SurfaceOptionsFoldout.value)             {                 DrawSurfaceOptions(material);                 EditorGUILayout.Space();             }             EditorGUILayout.EndFoldoutHeaderGroup();              m_SurfaceInputsFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(m_SurfaceInputsFoldout.value, Styles.SurfaceInputs);             if (m_SurfaceInputsFoldout.value)             {                 DrawSurfaceInputs(material);                 EditorGUILayout.Space();             }             EditorGUILayout.EndFoldoutHeaderGroup();              m_AdvancedFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(m_AdvancedFoldout.value, Styles.AdvancedLabel);             if (m_AdvancedFoldout.value)             {                 DrawAdvancedOptions(material);                 EditorGUILayout.Space();             }             EditorGUILayout.EndFoldoutHeaderGroup();              DrawAdditionalFoldouts(material);              if (EditorGUI.EndChangeCheck())             {                 foreach (var obj in materialEditor.targets)                     MaterialChanged((Material)obj);             }         }          #endregion         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         \/\/ Drawing Functions              \/\/         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         #region DrawingFunctions          public virtual void DrawSurfaceOptions(Material material)         {             DoPopup(Styles.surfaceType, surfaceTypeProp, Enum.GetNames(typeof(SurfaceType)));             if ((SurfaceType)material.GetFloat(&quot;_Surface&quot;) == SurfaceType.Transparent)                 DoPopup(Styles.blendingMode, blendModeProp, Enum.GetNames(typeof(BlendMode)));              EditorGUI.BeginChangeCheck();             EditorGUI.showMixedValue = cullingProp.hasMixedValue;             var culling = (RenderFace)cullingProp.floatValue;             culling = (RenderFace)EditorGUILayout.EnumPopup(Styles.cullingText, culling);             if (EditorGUI.EndChangeCheck())             {                 materialEditor.RegisterPropertyChangeUndo(Styles.cullingText.text);                 cullingProp.floatValue = (float)culling;                 material.doubleSidedGI = (RenderFace)cullingProp.floatValue != RenderFace.Front;             }              EditorGUI.showMixedValue = false;              EditorGUI.BeginChangeCheck();             EditorGUI.showMixedValue = alphaClipProp.hasMixedValue;             var alphaClipEnabled = EditorGUILayout.Toggle(Styles.alphaClipText, alphaClipProp.floatValue == 1);             if (EditorGUI.EndChangeCheck())                 alphaClipProp.floatValue = alphaClipEnabled ? 1 : 0;             EditorGUI.showMixedValue = false;              if (alphaClipProp.floatValue == 1)                 materialEditor.ShaderProperty(alphaCutoffProp, Styles.alphaClipThresholdText, 1);              if (receiveShadowsProp != null)             {                 EditorGUI.BeginChangeCheck();                 EditorGUI.showMixedValue = receiveShadowsProp.hasMixedValue;                 var receiveShadows =                     EditorGUILayout.Toggle(Styles.receiveShadowText, receiveShadowsProp.floatValue == 1.0f);                 if (EditorGUI.EndChangeCheck())                     receiveShadowsProp.floatValue = receiveShadows ? 1.0f : 0.0f;                 EditorGUI.showMixedValue = false;             }         }          public virtual void DrawSurfaceInputs(Material material)         {             DrawBaseProperties(material);         }          public virtual void DrawAdvancedOptions(Material material)         {             materialEditor.EnableInstancingField();              if (queueOffsetProp != null)             {                 EditorGUI.BeginChangeCheck();                 EditorGUI.showMixedValue = queueOffsetProp.hasMixedValue;                 var queue = EditorGUILayout.IntSlider(Styles.queueSlider, (int)queueOffsetProp.floatValue, -queueOffsetRange, queueOffsetRange);                 if (EditorGUI.EndChangeCheck())                     queueOffsetProp.floatValue = queue;                 EditorGUI.showMixedValue = false;             }         }          public virtual void DrawAdditionalFoldouts(Material material) { }          public virtual void DrawBaseProperties(Material material)         {             if (baseMapProp != null && baseColorProp != null) \/\/ Draw the baseMap, most shader will have at least a baseMap             {                 materialEditor.TexturePropertySingleLine(Styles.baseMap, baseMapProp, baseColorProp);                 \/\/ TODO Temporary fix for lightmapping, to be replaced with attribute tag.                 if (material.HasProperty(&quot;_MainTex&quot;))                 {                     material.SetTexture(&quot;_MainTex&quot;, baseMapProp.textureValue);                     var baseMapTiling = baseMapProp.textureScaleAndOffset;                     material.SetTextureScale(&quot;_MainTex&quot;, new Vector2(baseMapTiling.x, baseMapTiling.y));                     material.SetTextureOffset(&quot;_MainTex&quot;, new Vector2(baseMapTiling.z, baseMapTiling.w));                 }             }         }          protected virtual void DrawEmissionProperties(Material material, bool keyword)         {             var emissive = true;             var hadEmissionTexture = emissionMapProp.textureValue != null;              if (!keyword)             {                 materialEditor.TexturePropertyWithHDRColor(Styles.emissionMap, emissionMapProp, emissionColorProp,                     false);             }             else             {                 \/\/ Emission for GI?                 emissive = materialEditor.EmissionEnabledProperty();                  EditorGUI.BeginDisabledGroup(!emissive);                 {                     \/\/ Texture and HDR color controls                     materialEditor.TexturePropertyWithHDRColor(Styles.emissionMap, emissionMapProp,                         emissionColorProp,                         false);                 }                 EditorGUI.EndDisabledGroup();             }              \/\/ If texture was assigned and color was black set color to white             var brightness = emissionColorProp.colorValue.maxColorComponent;             if (emissionMapProp.textureValue != null && !hadEmissionTexture && brightness &lt;= 0f)                 emissionColorProp.colorValue = Color.white;              \/\/ LW does not support RealtimeEmissive. We set it to bake emissive and handle the emissive is black right.             if (emissive)             {                 material.globalIlluminationFlags = MaterialGlobalIlluminationFlags.BakedEmissive;                 if (brightness &lt;= 0f)                     material.globalIlluminationFlags |= MaterialGlobalIlluminationFlags.EmissiveIsBlack;             }         }          public static void DrawNormalArea(MaterialEditor materialEditor, MaterialProperty bumpMap, MaterialProperty bumpMapScale = null)         {             if (bumpMapScale != null)             {                 materialEditor.TexturePropertySingleLine(Styles.normalMapText, bumpMap,                     bumpMap.textureValue != null ? bumpMapScale : null);                 if (bumpMapScale.floatValue != 1 &&                     UnityEditorInternal.InternalEditorUtility.IsMobilePlatform(                         EditorUserBuildSettings.activeBuildTarget))                     if (materialEditor.HelpBoxWithButton(Styles.bumpScaleNotSupported, Styles.fixNormalNow))                         bumpMapScale.floatValue = 1;             }             else             {                 materialEditor.TexturePropertySingleLine(Styles.normalMapText, bumpMap);             }         }          protected static void DrawTileOffset(MaterialEditor materialEditor, MaterialProperty textureProp)         {             materialEditor.TextureScaleOffsetProperty(textureProp);         }          #endregion         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         \/\/ Material Data Functions        \/\/         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         #region MaterialDataFunctions          public static void SetMaterialKeywords(Material material, Action&lt;Material&gt; shadingModelFunc = null, Action&lt;Material&gt; shaderFunc = null)         {             \/\/ Clear all keywords for fresh start             material.shaderKeywords = null;             \/\/ Setup blending - consistent across all LWRP shaders             SetupMaterialBlendMode(material);             \/\/ Receive Shadows             if (material.HasProperty(&quot;_ReceiveShadows&quot;))                 CoreUtils.SetKeyword(material, &quot;_RECEIVE_SHADOWS_OFF&quot;, material.GetFloat(&quot;_ReceiveShadows&quot;) == 0.0f);             \/\/ Emission             if (material.HasProperty(&quot;_EmissionColor&quot;))                 MaterialEditor.FixupEmissiveFlag(material);             bool shouldEmissionBeEnabled =                 (material.globalIlluminationFlags & MaterialGlobalIlluminationFlags.EmissiveIsBlack) == 0;             if (material.HasProperty(&quot;_EmissionEnabled&quot;) && !shouldEmissionBeEnabled)                 shouldEmissionBeEnabled = material.GetFloat(&quot;_EmissionEnabled&quot;) &gt;= 0.5f;             CoreUtils.SetKeyword(material, &quot;_EMISSION&quot;, shouldEmissionBeEnabled);             \/\/ Normal Map             if (material.HasProperty(&quot;_BumpMap&quot;))                 CoreUtils.SetKeyword(material, &quot;_NORMALMAP&quot;, material.GetTexture(&quot;_BumpMap&quot;));             \/\/ Shader specific keyword functions             shadingModelFunc?.Invoke(material);             shaderFunc?.Invoke(material);         }          public static void SetupMaterialBlendMode(Material material)         {             if (material == null)                 throw new ArgumentNullException(&quot;material&quot;);              bool alphaClip = material.GetFloat(&quot;_AlphaClip&quot;) == 1;             if (alphaClip)             {                 material.EnableKeyword(&quot;_ALPHATEST_ON&quot;);             }             else             {                 material.DisableKeyword(&quot;_ALPHATEST_ON&quot;);             }              var queueOffset = 0; \/\/ queueOffsetRange;             if (material.HasProperty(&quot;_QueueOffset&quot;))                 queueOffset = queueOffsetRange - (int)material.GetFloat(&quot;_QueueOffset&quot;);              SurfaceType surfaceType = (SurfaceType)material.GetFloat(&quot;_Surface&quot;);             if (surfaceType == SurfaceType.Opaque)             {                 if (alphaClip)                 {                     material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.AlphaTest;                     material.SetOverrideTag(&quot;RenderType&quot;, &quot;TransparentCutout&quot;);                 }                 else                 {                     material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Geometry;                     material.SetOverrideTag(&quot;RenderType&quot;, &quot;Opaque&quot;);                 }                 material.renderQueue += queueOffset;                 material.SetInt(&quot;_SrcBlend&quot;, (int)UnityEngine.Rendering.BlendMode.One);                 material.SetInt(&quot;_DstBlend&quot;, (int)UnityEngine.Rendering.BlendMode.Zero);                 material.SetInt(&quot;_ZWrite&quot;, 1);                 material.DisableKeyword(&quot;_ALPHAPREMULTIPLY_ON&quot;);                 material.SetShaderPassEnabled(&quot;ShadowCaster&quot;, true);             }             else             {                 BlendMode blendMode = (BlendMode)material.GetFloat(&quot;_Blend&quot;);                 var queue = (int)UnityEngine.Rendering.RenderQueue.Transparent;                  \/\/ Specific Transparent Mode Settings                 switch (blendMode)                 {                     case BlendMode.Alpha:                         material.SetInt(&quot;_SrcBlend&quot;, (int)UnityEngine.Rendering.BlendMode.SrcAlpha);                         material.SetInt(&quot;_DstBlend&quot;, (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);                         material.DisableKeyword(&quot;_ALPHAPREMULTIPLY_ON&quot;);                         break;                     case BlendMode.Premultiply:                         material.SetInt(&quot;_SrcBlend&quot;, (int)UnityEngine.Rendering.BlendMode.One);                         material.SetInt(&quot;_DstBlend&quot;, (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);                         material.EnableKeyword(&quot;_ALPHAPREMULTIPLY_ON&quot;);                         break;                     case BlendMode.Additive:                         material.SetInt(&quot;_SrcBlend&quot;, (int)UnityEngine.Rendering.BlendMode.One);                         material.SetInt(&quot;_DstBlend&quot;, (int)UnityEngine.Rendering.BlendMode.One);                         material.DisableKeyword(&quot;_ALPHAPREMULTIPLY_ON&quot;);                         break;                     case BlendMode.Multiply:                         material.SetInt(&quot;_SrcBlend&quot;, (int)UnityEngine.Rendering.BlendMode.DstColor);                         material.SetInt(&quot;_DstBlend&quot;, (int)UnityEngine.Rendering.BlendMode.Zero);                         material.DisableKeyword(&quot;_ALPHAPREMULTIPLY_ON&quot;);                         material.EnableKeyword(&quot;_ALPHAMODULATE_ON&quot;);                         break;                 }                 \/\/ General Transparent Material Settings                 material.SetOverrideTag(&quot;RenderType&quot;, &quot;Transparent&quot;);                 material.SetInt(&quot;_ZWrite&quot;, 0);                 material.renderQueue = queue + queueOffset;                 material.SetShaderPassEnabled(&quot;ShadowCaster&quot;, false);             }         }          #endregion         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         \/\/ Helper Functions               \/\/         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/         #region HelperFunctions          public static void TwoFloatSingleLine(GUIContent title, MaterialProperty prop1, GUIContent prop1Label,             MaterialProperty prop2, GUIContent prop2Label, MaterialEditor materialEditor, float labelWidth = 30f)         {             EditorGUI.BeginChangeCheck();             EditorGUI.showMixedValue = prop1.hasMixedValue || prop2.hasMixedValue;             Rect rect = EditorGUILayout.GetControlRect();             EditorGUI.PrefixLabel(rect, title);             var indent = EditorGUI.indentLevel;             var preLabelWidth = EditorGUIUtility.labelWidth;             EditorGUI.indentLevel = 0;             EditorGUIUtility.labelWidth = labelWidth;             Rect propRect1 = new Rect(rect.x + preLabelWidth, rect.y,                 (rect.width - preLabelWidth) * 0.5f, EditorGUIUtility.singleLineHeight);             var prop1val = EditorGUI.FloatField(propRect1, prop1Label, prop1.floatValue);              Rect propRect2 = new Rect(propRect1.x + propRect1.width, rect.y,                 propRect1.width, EditorGUIUtility.singleLineHeight);             var prop2val = EditorGUI.FloatField(propRect2, prop2Label, prop2.floatValue);              EditorGUI.indentLevel = indent;             EditorGUIUtility.labelWidth = preLabelWidth;              if (EditorGUI.EndChangeCheck())             {                 materialEditor.RegisterPropertyChangeUndo(title.text);                 prop1.floatValue = prop1val;                 prop2.floatValue = prop2val;             }              EditorGUI.showMixedValue = false;         }          public void DoPopup(GUIContent label, MaterialProperty property, string[] options)         {             DoPopup(label, property, options, materialEditor);         }          public static void DoPopup(GUIContent label, MaterialProperty property, string[] options, MaterialEditor materialEditor)         {             if (property == null)                 throw new ArgumentNullException(&quot;property&quot;);              EditorGUI.showMixedValue = property.hasMixedValue;              var mode = property.floatValue;             EditorGUI.BeginChangeCheck();             mode = EditorGUILayout.Popup(label, (int)mode, options);             if (EditorGUI.EndChangeCheck())             {                 materialEditor.RegisterPropertyChangeUndo(label.text);                 property.floatValue = mode;             }              EditorGUI.showMixedValue = false;         }          \/\/ Helper to show texture and color properties         public static Rect TextureColorProps(MaterialEditor materialEditor, GUIContent label, MaterialProperty textureProp, MaterialProperty colorProp, bool hdr = false)         {             Rect rect = EditorGUILayout.GetControlRect();             EditorGUI.showMixedValue = textureProp.hasMixedValue;             materialEditor.TexturePropertyMiniThumbnail(rect, textureProp, label.text, label.tooltip);             EditorGUI.showMixedValue = false;              if (colorProp != null)             {                 EditorGUI.BeginChangeCheck();                 EditorGUI.showMixedValue = colorProp.hasMixedValue;                 int indentLevel = EditorGUI.indentLevel;                 EditorGUI.indentLevel = 0;                 Rect rectAfterLabel = new Rect(rect.x + EditorGUIUtility.labelWidth, rect.y,                     EditorGUIUtility.fieldWidth, EditorGUIUtility.singleLineHeight);                 var col = EditorGUI.ColorField(rectAfterLabel, GUIContent.none, colorProp.colorValue, true,                     false, hdr);                 EditorGUI.indentLevel = indentLevel;                 if (EditorGUI.EndChangeCheck())                 {                     materialEditor.RegisterPropertyChangeUndo(colorProp.displayName);                     colorProp.colorValue = col;                 }                 EditorGUI.showMixedValue = false;             }              return rect;         }          \/\/ Copied from shaderGUI as it is a protected function in an abstract class, unavailable to others          public new static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties)         {             return FindProperty(propertyName, properties, true);         }          \/\/ Copied from shaderGUI as it is a protected function in an abstract class, unavailable to others          public new static MaterialProperty FindProperty(string propertyName, MaterialProperty[] properties, bool propertyIsMandatory)         {             for (int index = 0; index &lt; properties.Length; ++index)             {                 if (properties[index] != null && properties[index].name == propertyName)                     return properties[index];             }             if (propertyIsMandatory)                 throw new ArgumentException(&quot;Could not find MaterialProperty: '&quot; + propertyName + &quot;', Num properties: &quot; + (object)properties.Length);             return null;         }          #endregion     } }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">LitShaderEditor.cs<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using System; using UnityEngine; using UnityEngine.Rendering; using UnityEditor.Rendering.LWRP;  namespace UnityEditor.Rendering.LWRP.ShaderGUI {     internal class LitShaderEditor : BaseShaderEditor     {         \/\/ Properties         private LitGUI.LitProperties litProperties;          \/\/ collect properties from the material properties         public override void FindProperties(MaterialProperty[] properties)         {             base.FindProperties(properties);             litProperties = new LitGUI.LitProperties(properties);         }          \/\/ material changed check         public override void MaterialChanged(Material material)         {             if (material == null)                 throw new ArgumentNullException(&quot;material&quot;);              SetMaterialKeywords(material, LitGUI.SetMaterialKeywords);         }          \/\/ material main surface options         public override void DrawSurfaceOptions(Material material)         {             if (material == null)                 throw new ArgumentNullException(&quot;material&quot;);              \/\/ Use default labelWidth             EditorGUIUtility.labelWidth = 0f;              \/\/ Detect any changes to the material             EditorGUI.BeginChangeCheck();             if (litProperties.workflowMode != null)             {                 DoPopup(LitGUI.Styles.workflowModeText, litProperties.workflowMode, Enum.GetNames(typeof(LitGUI.WorkflowMode)));             }             if (EditorGUI.EndChangeCheck())             {                 foreach (var obj in blendModeProp.targets)                     MaterialChanged((Material)obj);             }             base.DrawSurfaceOptions(material);         }          \/\/ material main surface inputs         public override void DrawSurfaceInputs(Material material)         {             base.DrawSurfaceInputs(material);             LitGUI.Inputs(litProperties, materialEditor, material);             DrawEmissionProperties(material, true);             DrawTileOffset(materialEditor, baseMapProp);         }          \/\/ material main advanced options         public override void DrawAdvancedOptions(Material material)         {             if (litProperties.reflections != null && litProperties.highlights != null)             {                 EditorGUI.BeginChangeCheck();                 {                     materialEditor.ShaderProperty(litProperties.highlights, LitGUI.Styles.highlightsText);                     materialEditor.ShaderProperty(litProperties.reflections, LitGUI.Styles.reflectionsText);                     EditorGUI.BeginChangeCheck();                 }             }              base.DrawAdvancedOptions(material);         }          public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)         {             if (material == null)                 throw new ArgumentNullException(&quot;material&quot;);              \/\/ _Emission property is lost after assigning Standard shader to the material             \/\/ thus transfer it before assigning the new shader             if (material.HasProperty(&quot;_Emission&quot;))             {                 material.SetColor(&quot;_EmissionColor&quot;, material.GetColor(&quot;_Emission&quot;));             }              base.AssignNewShaderToMaterial(material, oldShader, newShader);              if (oldShader == null || !oldShader.name.Contains(&quot;Legacy Shaders\/&quot;))             {                 SetupMaterialBlendMode(material);                 return;             }              SurfaceType surfaceType = SurfaceType.Opaque;             BlendMode blendMode = BlendMode.Alpha;             if (oldShader.name.Contains(&quot;\/Transparent\/Cutout\/&quot;))             {                 surfaceType = SurfaceType.Opaque;                 material.SetFloat(&quot;_AlphaClip&quot;, 1);             }             else if (oldShader.name.Contains(&quot;\/Transparent\/&quot;))             {                 \/\/ NOTE: legacy shaders did not provide physically based transparency                 \/\/ therefore Fade mode                 surfaceType = SurfaceType.Transparent;                 blendMode = BlendMode.Alpha;             }             material.SetFloat(&quot;_Surface&quot;, (float)surfaceType);             material.SetFloat(&quot;_Blend&quot;, (float)blendMode);              if (oldShader.name.Equals(&quot;Standard (Specular setup)&quot;))             {                 material.SetFloat(&quot;_WorkflowMode&quot;, (float)LitGUI.WorkflowMode.Specular);                 Texture texture = material.GetTexture(&quot;_SpecGlossMap&quot;);                 if (texture != null)                     material.SetTexture(&quot;_MetallicSpecGlossMap&quot;, texture);             }             else             {                 material.SetFloat(&quot;_WorkflowMode&quot;, (float)LitGUI.WorkflowMode.Metallic);                 Texture texture = material.GetTexture(&quot;_MetallicGlossMap&quot;);                 if (texture != null)                     material.SetTexture(&quot;_MetallicSpecGlossMap&quot;, texture);             }              MaterialChanged(material);         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0448\u0435\u0439\u0434\u0435\u0440\u0430. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u043d\u0430 \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0448\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0432 \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u044f\u0442\u044c \u043f\u0430\u0441\u0441\u043e\u0432. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445:<\/p>\n<ol>\n<li> <b>ForwardLit:<\/b> Forward \u043f\u0430\u0441\u0441, \u0442\u0443\u0442 \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0432\u0435\u0442, PBR \u0438 \u0442\u0443\u043c\u0430\u043d.<\/li>\n<li> <b>ShadowCaster:<\/b> \u0442\u0443\u0442 \u0438\u0434\u0451\u0442 \u0440\u0430\u0441\u0441\u0447\u0451\u0442 \u0442\u0435\u043d\u0435\u0439.<\/li>\n<li> <b>DepthOnly: <\/b> \u0433\u043b\u0443\u0431\u0438\u043d\u0430 (Z-Buffer). <\/li>\n<li> <b>Meta: <\/b> \u0437\u0430\u043f\u0435\u0447\u0451\u043d\u043d\u044b\u0439 \u0441\u0432\u0435\u0442 (\u043b\u0430\u0439\u0442\u043c\u0430\u043f\u044b). <\/li>\n<li> <b>Lightweight2D: <\/b> \u0441\u043f\u0440\u0430\u0439\u0442\u044b \u0438 UI.<\/li>\n<\/ol>\n<p>  Unity \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438 \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u0414\u043b\u044f SRP \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f HLSLcc. \u041d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 API OpenGL ES (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Android), HLSLcc \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"cpp\">#pragma prefer_hlslcc gles<\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 DirectX 9 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0435\u0433\u043e: <\/p>\n<pre><code class=\"cpp\">#pragma exclude_renderers d3d11_9x<\/code><\/pre>\n<p>  \u0412 \u043f\u043b\u0430\u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u2014 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u043d\u0435 \u043d\u0430 CG, \u0430 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c HLSL, \u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0435\u043b\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">HLSLPROGRAM ... ENDHLSL<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <b>_Time<\/b>, <b>_ScreenParams<\/b> \u0438\u043b\u0438 <b>_WorldSpaceCameraPos<\/b>. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u043d\u0430\u043d\u044b \u0432 <i>UnityCG.cginc<\/i> \u043d\u0430\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0445 \u0442\u0440\u0430\u043d\u0441\u043e\u0440\u0444\u043c\u0430\u0446\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u043c <b>UnityObjectToClipPos(POSITION)<\/b> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <b>TransformWorldToHClip(POSITION)<\/b>, \u043d\u0443 \u0438\u043b\u0438 \u0434\u043b\u044f \u0442\u0443\u043c\u0430\u043d\u0430 \u2014 \u0432\u043c\u0435\u0441\u0442\u043e <b>UNITY_APPLY_FOG(fogCoord, color)<\/b> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u044c\u0437\u0443\u0435\u043c <b>MixFog(color, fogCoord) <\/b>.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0439\u0434\u044f \u043f\u043e \u0432\u0441\u0451 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0438 \u043d\u0430\u0439\u0434\u044f \u0444\u0430\u0439\u043b Core.hlsl:  <\/p>\n<blockquote><p><i>%localappdata%\\Unity\\cache\\packages\\packages.unity.com\\com.unity.render-pipelines.lightweight@(\u0432\u0435\u0440\u0441\u0438\u044f LWRP)\\ShaderLibrary\\Core.hlsl<\/i><\/p><\/blockquote>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b (CBUFFER) \u0438 UnityPerMaterial. \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0434\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 GPU, \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0448\u0435\u0439\u0434\u0435\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u044b<br \/>  <i>CBUFFER_START<\/i> \u0438 <i>CBUFFER_END<\/i>:<\/p>\n<pre><code class=\"cpp\">CBUFFER_START(UnityPerMaterial)       float4 _BaseMap_ST;       half4 _BaseColor;       half4 _SpecColor;       half4 _EmissionColor;       half _Cutoff;       half _Smoothness;       half _Metallic;       half _BumpScale;       half _OcclusionStrength; CBUFFER_END<\/code><\/pre>\n<p>  \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438-\u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 (\u0438\u0437 \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e-\u0441\u0442\u0430\u0440\u0438\u043d\u043a\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u0448\u0435\u0439\u0434\u0435\u0440\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<p>  LWRP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u2014 <b>UnityPerObject<\/b> \u0438 <b>UnityPerMaterial<\/b>. \u042d\u0442\u0438 \u0431\u0443\u0444\u0435\u0440\u0430 \u0431\u0438\u043d\u0434\u044f\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0431\u0438\u043d\u0434\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f setpass \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u042d\u0442\u043e \u0432\u044b\u0433\u043e\u0434\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0448\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e LWRP \u043c\u043e\u0436\u0435\u0442 \u043f\u0430\u043a\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0448\u0435\u0439\u0434\u0435\u0440\u0430 \u2014 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u0430.<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u0445, \u043d\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 <a href=\"https:\/\/github.com\/johnsietsma\/ExtendingLWRP\/wiki\/LWRPShaders\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a SurfaceData:  <\/p>\n<pre><code class=\"cpp\">SurfaceData surfaceData;<\/code><\/pre>\n<p>  \u0422\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e-\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0437\u0430\u0432\u0435\u0442\u043d\u044b\u0439 <b>PBR Master<\/b> \u0438\u0437 <b>ShaderGraph<\/b>. <\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440<\/h4>\n<p>  \u0418\u0442\u0430\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d\u044b \u0440\u0443\u043a\u0438, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f <br \/>  \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0430\u043a\u0445\u0430\u043d\u0430\u043b\u0438\u044e! \u0414\u043e\u0431\u0430\u0432\u0438\u043c-\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 <b>Vertex Displacement<\/b> \u0438 <b>Dissolve Effect<\/b>, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0443\u0441\u0442\u0438\u043c \u0432 \u043f\u043b\u044f\u0441. <\/p>\n<p>  <a href=\"https:\/\/gifyu.com\/image\/q2wn\"><img decoding=\"async\" src=\"https:\/\/s5.gifyu.com\/images\/LVRP_TextShaders_2020-01-20_21-08-42.gif\" alt=\"LVRP_TextShaders_2020-01-20_21-08-42.gif\"\/><\/a><\/p>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u0430\u0441\u0441\u044b \u0443 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0434 \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e.<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u0441\u044b:<\/p>\n<pre><code class=\"cpp\">Properties {        ...        _DissolveMap(&quot;Dissolve Map&quot;, 2D) = &quot;white&quot; {}        _DissolveFactor(&quot;Dissolve Factor&quot;, Range(0, 1)) = 0.0        _DissolveWidth(&quot;Dissolve Width&quot;, Range(0, 1)) = 0.0        [HDR]_DissolveColor(&quot;Color&quot;, Color) = (1,1,0) }<\/code><\/pre>\n<p>  \u041a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u044f\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0438 \u0433\u043e\u0440\u044f\u0447\u043e \u043b\u044e\u0431\u0438\u043c\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043e\u0447\u043a\u0435 \u0432 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0435: <br \/>  <a href=\"https:\/\/gifyu.com\/image\/q23C\"><img decoding=\"async\" src=\"https:\/\/s5.gifyu.com\/images\/2020-01-20_22-55-14.png\" alt=\"2020-01-20_22-55-14.png\"\/><\/a><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"cpp\">CBUFFER_START(UnityPerMaterial)      ...      float4 _DissolveMap_ST; \/\/\u0422\u0430\u0439\u043b\u0438\u043d\u0433 \u0438 \u043e\u0444\u0444\u0441\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b _DissolveMap CBUFFER_END  TEXTURE2D(_DissolveMap);        SAMPLER(sampler_DissolveMap);              float _DissolveFactor; float _DissolveWidth; float4 _DissolveColor;<\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044e \u0432 \u043f\u044c\u044f\u043d\u044b\u0439 \u0443\u0433\u0430\u0440:<\/p>\n<pre><code class=\"cpp\">Varyings LitPassVertex(Attributes input) {     ...     input.positionOS.xyz += normalize(input.positionOS.xyz) * sin(input.positionOS.x) * sin(_Time.x * 100);     ... }<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0442\u0435\u043d\u044c:  <\/p>\n<pre><code class=\"cpp\">Varyings ShadowPassVertex(Attributes input) {        ...        input.positionOS.xyz += normalize(input.positionOS.xyz) * sin(input.positionOS.x) * sin(_Time.x * 100);        ...          }<\/code><\/pre>\n<p>  \u0413\u043b\u0443\u0431\u0438\u043d\u0430:<\/p>\n<pre><code class=\"cpp\">Varyings DepthOnlyVertex(Attributes input) {        ...        input.position.xyz += normalize(input.position.xyz) * sin(input.position.x) * sin(_Time.x * 100);        ...          }<\/code><\/pre>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0440\u0435\u043c\u044f Dissolve \u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">half4 LitPassFragment(Varyings input) : SV_Target {       ...       \/\/\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c UV \u043d\u0430 \u043f\u0440\u043e\u0433\u0443\u043b\u043a\u0443        input.uv += _Time.x * 10;       \/\/\u0442\u0443\u0442 \u0441\u044d\u043c\u043f\u043b\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0443\u0442\u0440\u0443 \u0448\u0443\u043c\u0430 \u0434\u043b\u044f Dissolve \u044d\u0444\u0444\u0435\u043a\u0442\u0430       float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);       if (mask.r &gt; _DissolveFactor)           discard;       \/\/\u043e\u0431\u0432\u043e\u0434\u043a\u0430 \u0434\u0438\u0441\u0441\u043e\u043b\u0432\u0430       bool outline = mask.r &gt; _DissolveFactor - _DissolveWidth;       \/\/\u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u044d\u043c\u0438\u0448\u0435\u043d        surfaceData.emission *= outline * _DissolveColor;       \/\/\u041e\u043f\u0430, \u0430 \u0432\u043e\u0442 \u0442\u0443\u0442 PBR-\u0447\u0438\u043a \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f        half4 color = LightweightFragmentPBR(inputData, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha);       \/\/\u041d\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0432\u043e\u0434\u043a\u0443 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442       color *= lerp(1, _DissolveColor, outline);       ... }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0437\u0442\u0438 Dissolve \u0438 \u0432 \u0442\u0435\u043d\u044c, \u0442\u043e\u0433\u0434\u0430 \u043b\u0451\u0433\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0443\u043a\u0438 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043d\u044c, \u043a\u043e\u0435\u0439 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432 <b>Shader Graph <\/b>\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e, \u0430 \u0442\u0443\u0442 \u2014 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u0430\u0440\u0430 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430. <\/p>\n<pre><code class=\"cpp\"> half4 ShadowPassFragment(Varyings input) : SV_TARGET {       ...       float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);       if (mask.r &gt; _DissolveFactor)           discard;       ... }<\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0448\u0435\u0439\u0434\u0435\u0440\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SimpleDissolve<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> Shader &quot;TheProxor\/LWRP\/Dissolve + Vertex Offset&quot; {             Properties             {                 \/\/ Specular vs Metallic workflow                 [HideInInspector] _WorkflowMode(&quot;WorkflowMode&quot;, Float) = 1.0                  [MainColor][HideInInspector] _BaseColor(&quot;Color&quot;, Color) = (0.5,0.5,0.5,1)                 [MainTexture][HideInInspector] _BaseMap(&quot;Albedo&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector]_Cutoff(&quot;Alpha Cutoff&quot;, Range(0.0, 1.0)) = 0.5                  [HideInInspector]_Smoothness(&quot;Smoothness&quot;, Range(0.0, 1.0)) = 0.5                 [HideInInspector]_GlossMapScale(&quot;Smoothness Scale&quot;, Range(0.0, 1.0)) = 1.0                 [HideInInspector]_SmoothnessTextureChannel(&quot;Smoothness texture channel&quot;, Float) = 0                  [Gamma][HideInInspector] _Metallic(&quot;Metallic&quot;, Range(0.0, 1.0)) = 0.0                 [HideInInspector]_MetallicGlossMap(&quot;Metallic&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector]_SpecColor(&quot;Specular&quot;, Color) = (0.2, 0.2, 0.2)                 [HideInInspector]_SpecGlossMap(&quot;Specular&quot;, 2D) = &quot;white&quot; {}                  [HideInInspector][ToggleOff] _SpecularHighlights(&quot;Specular Highlights&quot;, Float) = 1.0                 [HideInInspector][ToggleOff] _EnvironmentReflections(&quot;Environment Reflections&quot;, Float) = 1.0                  [HideInInspector]_BumpScale(&quot;Scale&quot;, Float) = 1.0                 [HideInInspector]_BumpMap(&quot;Normal Map&quot;, 2D) = &quot;bump&quot; {}                  [HideInInspector]_OcclusionStrength(&quot;Strength&quot;, Range(0.0, 1.0)) = 1.0                 [HideInInspector]_OcclusionMap(&quot;Occlusion&quot;, 2D) = &quot;white&quot; {}                  [HDR][HideInInspector]_EmissionColor(&quot;Color&quot;, Color) = (0,0,0)                 [HideInInspector]_EmissionMap(&quot;Emission&quot;, 2D) = &quot;white&quot; {}                  \/\/ Blending state                 [HideInInspector] _Surface(&quot;__surface&quot;, Float) = 0.0                 [HideInInspector] _Blend(&quot;__blend&quot;, Float) = 0.0                 [HideInInspector] _AlphaClip(&quot;__clip&quot;, Float) = 0.0                 [HideInInspector] _SrcBlend(&quot;__src&quot;, Float) = 1.0                 [HideInInspector] _DstBlend(&quot;__dst&quot;, Float) = 0.0                 [HideInInspector] _ZWrite(&quot;__zw&quot;, Float) = 1.0                 [HideInInspector] _Cull(&quot;__cull&quot;, Float) = 2.0                  [HideInInspector]_ReceiveShadows(&quot;Receive Shadows&quot;, Float) = 1.0                 \/\/ Editmode props                 [HideInInspector] _QueueOffset(&quot;Queue offset&quot;, Float) = 0.0                  \/\/ ObsoleteProperties                 [HideInInspector] _MainTex(&quot;BaseMap&quot;, 2D) = &quot;white&quot; {}                 [HideInInspector] _Color(&quot;Base Color&quot;, Color) = (0.5, 0.5, 0.5, 1)                 [HideInInspector] _GlossMapScale(&quot;Smoothness&quot;, Float) = 0.0                 [HideInInspector] _Glossiness(&quot;Smoothness&quot;, Float) = 0.0                 [HideInInspector] _GlossyReflections(&quot;EnvironmentReflections&quot;, Float) = 0.0                                    \/\/                 _DissolveMap(&quot;Dissolve Map&quot;, 2D) = &quot;white&quot; {}                 _DissolveFactor(&quot;Dissolve Factor&quot;, Range(0, 1)) = 0.0                 _DissolveWidth(&quot;Dissolve Width&quot;, Range(0, 1)) = 0.0                 [HDR]_DissolveColor(&quot;Color&quot;, Color) = (1,1,0)             }              SubShader             {                 \/\/ Lightweight Pipeline tag is required. If Lightweight render pipeline is not set in the graphics settings                 \/\/ this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this                 \/\/ material work with both Lightweight Render Pipeline and Builtin Unity Pipeline                 Tags{&quot;RenderType&quot; = &quot;Opaque&quot; &quot;RenderPipeline&quot; = &quot;LightweightPipeline&quot; &quot;IgnoreProjector&quot; = &quot;True&quot;}                 LOD 300                  \/\/ ------------------------------------------------------------------                 \/\/  Forward pass. Shades all light in a single pass. GI + emission + Fog                 Pass                 {                 \/\/ Lightmode matches the ShaderPassName set in LightweightRenderPipeline.cs. SRPDefaultUnlit and passes with                 \/\/ no LightMode tag are also rendered by Lightweight Render Pipeline                 Name &quot;ForwardLit&quot;                 Tags{&quot;LightMode&quot; = &quot;LightweightForward&quot;}                  Blend[_SrcBlend][_DstBlend]                 ZWrite[_ZWrite]                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard SRP library                 \/\/ All shaders must be compiled with HLSLcc and currently only gles is not using HLSLcc by default                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _NORMALMAP                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ALPHAPREMULTIPLY_ON                 #pragma shader_feature _EMISSION                 #pragma shader_feature _METALLICSPECGLOSSMAP                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                 #pragma shader_feature _OCCLUSIONMAP                  #pragma shader_feature _SPECULARHIGHLIGHTS_OFF                 #pragma shader_feature _ENVIRONMENTREFLECTIONS_OFF                 #pragma shader_feature _SPECULAR_SETUP                 #pragma shader_feature _RECEIVE_SHADOWS_OFF                  \/\/ -------------------------------------                 \/\/ Lightweight Pipeline keywords                 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS                 #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE                 #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS                 #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS                 #pragma multi_compile _ _SHADOWS_SOFT                 #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE                  \/\/ -------------------------------------                 \/\/ Unity defined keywords                 #pragma multi_compile _ DIRLIGHTMAP_COMBINED                 #pragma multi_compile _ LIGHTMAP_ON                 #pragma multi_compile_fog                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                  #pragma vertex LitPassVertex                 #pragma fragment LitPassFragment                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Lighting.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.core\/ShaderLibrary\/CommonMaterial.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/SurfaceInput.hlsl&quot;                  #ifdef _SPECULAR_SETUP                     #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, uv)                 #else                     #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_MetallicGlossMap, sampler_MetallicGlossMap, uv)                 #endif                    struct Attributes                 {                     float4 positionOS   : POSITION;                     float3 normalOS     : NORMAL;                     float4 tangentOS    : TANGENT;                     float2 texcoord     : TEXCOORD0;                     float2 lightmapUV   : TEXCOORD1;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv                       : TEXCOORD0;                     DECLARE_LIGHTMAP_OR_SH(lightmapUV, vertexSH, 1);                  #ifdef _ADDITIONAL_LIGHTS                     float3 positionWS               : TEXCOORD2;                 #endif                  #ifdef _NORMALMAP                     half4 normalWS                  : TEXCOORD3;    \/\/ xyz: normal, w: viewDir.x                     half4 tangentWS                 : TEXCOORD4;    \/\/ xyz: tangent, w: viewDir.y                     half4 bitangentWS                : TEXCOORD5;    \/\/ xyz: bitangent, w: viewDir.z                 #else                     half3 normalWS                  : TEXCOORD3;                     half3 viewDirWS                 : TEXCOORD4;                 #endif                      half4 fogFactorAndVertexLight   : TEXCOORD6; \/\/ x: fogFactor, yzw: vertex light                  #ifdef _MAIN_LIGHT_SHADOWS                     float4 shadowCoord              : TEXCOORD7;                 #endif                      float4 positionCS               : SV_POSITION;                     UNITY_VERTEX_INPUT_INSTANCE_ID                     UNITY_VERTEX_OUTPUT_STEREO                       float3 uvDissolve\t\t\t    : TEXCOORD8;                  };                   CBUFFER_START(UnityPerMaterial)                     float4 _BaseMap_ST;                     half4 _BaseColor;                     half4 _SpecColor;                     half4 _EmissionColor;                     half _Cutoff;                     half _Smoothness;                     half _Metallic;                     half _BumpScale;                     half _OcclusionStrength;                     float4 _DissolveMap_ST; \/\/\u0422\u0430\u0439\u043b\u0438\u043d\u0433 \u0438 \u043e\u0444\u0444\u0441\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b _DissolveMap                  CBUFFER_END                  TEXTURE2D(_OcclusionMap);       SAMPLER(sampler_OcclusionMap);                 TEXTURE2D(_MetallicGlossMap);   SAMPLER(sampler_MetallicGlossMap);                 TEXTURE2D(_SpecGlossMap);       SAMPLER(sampler_SpecGlossMap);                 TEXTURE2D(_DissolveMap);        SAMPLER(sampler_DissolveMap);                                  float _DissolveFactor;                 float _DissolveWidth;                 float4 _DissolveColor;                  half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha)                 {                     half4 specGloss;                      #ifdef _METALLICSPECGLOSSMAP                     specGloss = SAMPLE_METALLICSPECULAR(uv);                     #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                     specGloss.a = albedoAlpha * _Smoothness;                     #else                     specGloss.a *= _Smoothness;                     #endif                     #else \/\/ _METALLICSPECGLOSSMAP                     #if _SPECULAR_SETUP                     specGloss.rgb = _SpecColor.rgb;                     #else                     specGloss.rgb = _Metallic.rrr;                     #endif                      #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                     specGloss.a = albedoAlpha * _Smoothness;                     #else                     specGloss.a = _Smoothness;                     #endif                     #endif                      return specGloss;                 }                  half SampleOcclusion(float2 uv)                 {                     #ifdef _OCCLUSIONMAP                     \/\/ TODO: Controls things like these by exposing SHADER_QUALITY levels (low, medium, high)                     #if defined(SHADER_API_GLES)                     return SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;                     #else                     half occ = SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;                     return LerpWhiteTo(occ, _OcclusionStrength);                     #endif                     #else                     return 1.0;                     #endif                 }                  inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfaceData)                 {                     half4 albedoAlpha = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv);                    \/\/ half4 albedoAlpha = SampleAlbedoAlpha(uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap));                     outSurfaceData.alpha = Alpha(albedoAlpha.a, _BaseColor, _Cutoff);                      half4 specGloss = SampleMetallicSpecGloss(uv, albedoAlpha.a);                     outSurfaceData.albedo = albedoAlpha.rgb * _BaseColor.rgb;                      #if _SPECULAR_SETUP                     outSurfaceData.metallic = 1.0h;                     outSurfaceData.specular = specGloss.rgb;                     #else                     outSurfaceData.metallic = specGloss.r;                     outSurfaceData.specular = half3(0.0h, 0.0h, 0.0h);                     #endif                      outSurfaceData.smoothness = specGloss.a;                     outSurfaceData.normalTS = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale);                     outSurfaceData.occlusion = SampleOcclusion(uv);                     outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap));                    \/\/ outSurfaceData.emission = _EmissionColor.rgb * SAMPLE_TEXTURE2D(_EmissionMap, sampler_EmissionMap, uv);                 }                  void InitializeInputData(Varyings input, half3 normalTS, out InputData inputData)                 {                     inputData = (InputData)0;                  #ifdef _ADDITIONAL_LIGHTS                     inputData.positionWS = input.positionWS;                 #endif                  #ifdef _NORMALMAP                     half3 viewDirWS = half3(input.normalWS.w, input.tangentWS.w, input.bitangentWS.w);                     inputData.normalWS = TransformTangentToWorld(normalTS,                         half3x3(input.tangentWS.xyz, input.bitangentWS.xyz, input.normalWS.xyz));                 #else                     half3 viewDirWS = input.viewDirWS;                     inputData.normalWS = input.normalWS;                 #endif                      inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);                     viewDirWS = SafeNormalize(viewDirWS);                      inputData.viewDirectionWS = viewDirWS;                 #if defined(_MAIN_LIGHT_SHADOWS) && !defined(_RECEIVE_SHADOWS_OFF)                     inputData.shadowCoord = input.shadowCoord;                 #else                     inputData.shadowCoord = float4(0, 0, 0, 0);                 #endif                     inputData.fogCoord = input.fogFactorAndVertexLight.x;                     inputData.vertexLighting = input.fogFactorAndVertexLight.yzw;                     inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.vertexSH, inputData.normalWS);                 }                  \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/                 \/\/                  Vertex and Fragment functions                            \/\/                 \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/                  \/\/Standard (Physically Based) shader                 Varyings LitPassVertex(Attributes input)                 {                     Varyings output = (Varyings)0;                       UNITY_SETUP_INSTANCE_ID(input);                     UNITY_TRANSFER_INSTANCE_ID(input, output);                     UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);                       input.positionOS.xyz += sin(input.positionOS.x) * sin(_Time.x * 100);                      VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);                     VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS);                     half3 viewDirWS = GetCameraPositionWS() - vertexInput.positionWS;                     half3 vertexLight = VertexLighting(vertexInput.positionWS, normalInput.normalWS);                     half fogFactor = ComputeFogFactor(vertexInput.positionCS.z);                      output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                  #ifdef _NORMALMAP                     output.normalWS = half4(normalInput.normalWS, viewDirWS.x);                     output.tangentWS = half4(normalInput.tangentWS, viewDirWS.y);                     output.bitangentWS = half4(normalInput.bitangentWS, viewDirWS.z);                 #else                     output.normalWS = NormalizeNormalPerVertex(normalInput.normalWS);                     output.viewDirWS = viewDirWS;                 #endif                      OUTPUT_LIGHTMAP_UV(input.lightmapUV, unity_LightmapST, output.lightmapUV);                     OUTPUT_SH(output.normalWS.xyz, output.vertexSH);                      output.fogFactorAndVertexLight = half4(fogFactor, vertexLight);                  #ifdef _ADDITIONAL_LIGHTS                     output.positionWS = vertexInput.positionWS;                 #endif                  #if defined(_MAIN_LIGHT_SHADOWS) && !defined(_RECEIVE_SHADOWS_OFF)                     output.shadowCoord = GetShadowCoord(vertexInput);                 #endif                      output.positionCS = vertexInput.positionCS;                      return output;                 }                  \/\/ Used in Standard (Physically Based) shader                 half4 LitPassFragment(Varyings input) : SV_Target                 {                     input.uv += _Time.x * 10;                     UNITY_SETUP_INSTANCE_ID(input);                     UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);                      SurfaceData surfaceData;                     InitializeStandardLitSurfaceData(input.uv, surfaceData);                      InputData inputData;                     InitializeInputData(input, surfaceData.normalTS, inputData);                                          float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);                      if (mask.r &gt; _DissolveFactor)                         discard;                      bool outline = mask.r &gt; _DissolveFactor - _DissolveWidth;                     surfaceData.emission *= outline * _DissolveColor;                     half4 color = LightweightFragmentPBR(inputData, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha);                     color *= lerp(1, _DissolveColor, outline);                      color.rgb = MixFog(color.rgb, inputData.fogCoord);                                          return color;                 }                 ENDHLSL             }              \/\/\u0442\u0435\u043d\u0438             Pass             {                 Name &quot;ShadowCaster&quot;                 Tags{&quot;LightMode&quot; = &quot;ShadowCaster&quot;}                  ZWrite On                 ZTest LEqual                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _ALPHATEST_ON                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  #pragma vertex ShadowPassVertex                 #pragma fragment ShadowPassFragment                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                              #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Shadows.hlsl&quot;                  float3 _LightDirection;                  struct Attributes                 {                     float4 positionOS   : POSITION;                     float3 normalOS     : NORMAL;                     float2 texcoord     : TEXCOORD0;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv           : TEXCOORD0;                     float4 positionCS   : SV_POSITION;                 };                  CBUFFER_START(UnityPerMaterial)                     float4 _DissolveMap_ST; \/\/\u0422\u0430\u0439\u043b\u0438\u043d\u0433 \u0438 \u043e\u0444\u0444\u0441\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b _DissolveMap                     float _DissolveFactor;                 CBUFFER_END                  TEXTURE2D(_DissolveMap);        SAMPLER(sampler_DissolveMap);                  float4 GetShadowPositionHClip(Attributes input)                 {                     float3 positionWS = TransformObjectToWorld(input.positionOS.xyz);                     float3 normalWS = TransformObjectToWorldNormal(input.normalOS);                      float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, _LightDirection));                  #if UNITY_REVERSED_Z                     positionCS.z = min(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE);                 #else                     positionCS.z = max(positionCS.z, positionCS.w * UNITY_NEAR_CLIP_VALUE);                 #endif                      return positionCS;                 }                  Varyings ShadowPassVertex(Attributes input)                 {                     Varyings output;                     input.positionOS.xyz += normalize(input.positionOS.xyz) * sin(input.positionOS.x) * sin(_Time.x * 100);                     UNITY_SETUP_INSTANCE_ID(input);                     output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                     output.positionCS = GetShadowPositionHClip(input);                     return output;                 }                  half4 ShadowPassFragment(Varyings input) : SV_TARGET                 {                      float4 mask = SAMPLE_TEXTURE2D(_DissolveMap, sampler_DissolveMap, input.uv);                       if (mask.r &gt; _DissolveFactor)                          discard;                      Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff);                     return 0;                 }                  ENDHLSL             }              Pass             {                 Name &quot;DepthOnly&quot;                 Tags{&quot;LightMode&quot; = &quot;DepthOnly&quot;}                  ZWrite On                 ColorMask 0                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                 #pragma target 2.0                  #pragma vertex DepthOnlyVertex                 #pragma fragment DepthOnlyFragment                  \/\/ -------------------------------------                 \/\/ Material Keywords                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  \/\/--------------------------------------                 \/\/ GPU Instancing                 #pragma multi_compile_instancing                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/Core.hlsl&quot;                  #ifndef LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED                 #define LIGHTWEIGHT_DEPTH_ONLY_PASS_INCLUDED                  struct Attributes                 {                     float4 position     : POSITION;                     float2 texcoord     : TEXCOORD0;                     UNITY_VERTEX_INPUT_INSTANCE_ID                 };                  struct Varyings                 {                     float2 uv           : TEXCOORD0;                     float4 positionCS   : SV_POSITION;                     UNITY_VERTEX_INPUT_INSTANCE_ID                     UNITY_VERTEX_OUTPUT_STEREO                 };                  Varyings DepthOnlyVertex(Attributes input)                 {                     Varyings output = (Varyings)0;                     UNITY_SETUP_INSTANCE_ID(input);                     UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);                      input.position.xyz += normalize(input.position.xyz) * sin(input.position.x) * sin(_Time.x * 100);                      output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);                     output.positionCS = TransformObjectToHClip(input.position.xyz);                     return output;                 }                  half4 DepthOnlyFragment(Varyings input) : SV_TARGET                 {                     UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);                      Alpha(SampleAlbedoAlpha(input.uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap)).a, _BaseColor, _Cutoff);                     return 0;                 }                 #endif                  ENDHLSL             }              \/\/\u043b\u0430\u0439\u0442\u043c\u0430\u043f\u044b             Pass             {                 Name &quot;Meta&quot;                 Tags{&quot;LightMode&quot; = &quot;Meta&quot;}                  Cull Off                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                  #pragma vertex LightweightVertexMeta                 #pragma fragment LightweightFragmentMeta                  #pragma shader_feature _SPECULAR_SETUP                 #pragma shader_feature _EMISSION                 #pragma shader_feature _METALLICSPECGLOSSMAP                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A                  #pragma shader_feature _SPECGLOSSMAP                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/ShaderLibrary\/MetaInput.hlsl&quot;                  #ifndef LIGHTWEIGHT_LIT_META_PASS_INCLUDED                 #define LIGHTWEIGHT_LIT_META_PASS_INCLUDED                    Varyings LightweightVertexMeta(Attributes input)                 {                     Varyings output;                     output.positionCS = MetaVertexPosition(input.positionOS, input.uv1, input.uv2,                         unity_LightmapST, unity_DynamicLightmapST);                     output.uv = TRANSFORM_TEX(input.uv0, _BaseMap);                     return output;                 }                  half4 LightweightFragmentMeta(Varyings input) : SV_Target                 {                     SurfaceData surfaceData;                     InitializeStandardLitSurfaceData(input.uv, surfaceData);                      BRDFData brdfData;                     InitializeBRDFData(surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.alpha, brdfData);                      MetaInput metaInput;                     metaInput.Albedo = brdfData.diffuse + brdfData.specular * brdfData.roughness * 0.5;                     metaInput.SpecularColor = surfaceData.specular;                     metaInput.Emission = surfaceData.emission;                      return MetaFragment(metaInput);                 }                 #endif                 ENDHLSL             }              Pass             {                 Name &quot;Lightweight2D&quot;                 Tags{ &quot;LightMode&quot; = &quot;Lightweight2D&quot; }                  Blend[_SrcBlend][_DstBlend]                 ZWrite[_ZWrite]                 Cull[_Cull]                  HLSLPROGRAM                 \/\/ Required to compile gles 2.0 with standard srp library                 #pragma prefer_hlslcc gles                 #pragma exclude_renderers d3d11_9x                  #pragma vertex vert                 #pragma fragment frag                 #pragma shader_feature _ALPHATEST_ON                 #pragma shader_feature _ALPHAPREMULTIPLY_ON                  #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/LitInput.hlsl&quot;                 #include &quot;Packages\/com.unity.render-pipelines.lightweight\/Shaders\/Utils\/Lightweight2D.hlsl&quot;                 ENDHLSL             }               }                 FallBack &quot;Hidden\/InternalErrorShader&quot;                 CustomEditor &quot;UnityEditor.Rendering.LWRP.ShaderGUI.LitShaderEditor&quot; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0427\u0442\u043e \u0436\u0435, \u0432\u043e\u0442 \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0432\u0435\u0441\u0442\u0438 \u0438\u0442\u043e\u0433\u0438. \u041a\u0430\u043a \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432 LWRP \u043c\u043e\u0436\u043d\u043e \u0438 \u0434\u0430\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u043a\u043e\u0434\u043e\u043c, \u0438\u0431\u043e \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0443\u043a\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044f \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u0443\u0442\u044b\u0435 \u0448\u0442\u0443\u043a\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u0432\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0438\u0434\u0451\u0442 \u043d\u0438 \u0432 \u043a\u0430\u043a\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c <b>Standard Surface Shader-\u043e\u043c<\/b>, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443 \u043c\u0435\u043d\u044f \u0434\u043e\u0439\u0434\u0443\u0442 \u0440\u0443\u043a\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u0434\u043b\u044f LWRP \u0438 HDRP, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437. <\/p>\n<p>  \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/p>\n<p>  <a href=\"https:\/\/github.com\/TheProxor\/LWRP_TextShaders\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u0438<\/a><br \/>  <a href=\"https:\/\/github.com\/johnsietsma\/ExtendingLWRP\/wiki\/LWRPShaders\">\u041d\u0430\u0448\u0451\u043b \u044d\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u043d\u0435\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><br \/>  <a href=\"https:\/\/docs.unity3d.com\/Packages\/com.unity.render-pipelines.lightweight@6.9\/api\/UnityEngine.Experimental.Rendering.LWRP.html\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e LWRP<\/a><\/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=\"https:\/\/habr.com\/ru\/post\/485018\/\"> https:\/\/habr.com\/ru\/post\/485018\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/485018\/\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e (\u043f\u043e\u0447\u0442\u0438) \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 <b>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435<\/b> \u0448\u0435\u0439\u0434\u0435\u0440\u044b \u0432 Unity \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <b>Lightweight Rendering Pipeline (LWRP)<\/b> \u2014 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 <b>Scriptable Rendering Pipeline (SRP)<\/b>.<\/p>\n<h4>\u0410 \u043a\u0430\u043a \u0436\u0435 Shader Graph?<\/h4>\n<p>  <b>Shader Graph<\/b> \u2014 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0440\u043e\u044e, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0435 \u0438 \u0432\u043e\u0442 \u0442\u043e\u0433\u0434\u0430 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0434, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0441\u0443\u0431-\u0433\u0440\u0430\u0444\u043e\u0432 \u043d\u0435\u0438\u043c\u043e\u0432\u0435\u0440\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043e\u0442\u0447\u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u0442\u0451\u0440\u044b\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u0431\u0430\u0440\u0434\u0430\u043a\u0435. \u0412\u0441\u0435 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434 \u0430\u043f\u0440\u0438\u043e\u0440\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u0437\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0438\u0431\u043e \u043b\u044e\u0431\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u043a\u0435 \u043d\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u0432\u0435\u0440\u0448\u0438\u043d\u043d\u043e\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c. \u0411\u044b\u0432\u0430\u044e\u0442 \u0438 \u043b\u044e\u0434\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <b>\u043a\u043e\u0434\u043e\u043c<\/b>, \u0430 \u043d\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438. \u041f\u0440\u0438\u0447\u0438\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043d\u043e \u0441\u0443\u0442\u044c \u043e\u0434\u043d\u0430 \u2014 \u0434\u043e\u043b\u043e\u0439 \u043d\u043e\u0434\u044b, \u0434\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u0434!<\/p>\n<p>  <a href=\"https:\/\/ibb.co\/yBwCvZz\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/n8HydYX\/2020-01-19-17-07-35.png\" alt=\"2020-01-19-17-07-35\"\/><\/a>  <\/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-297501","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297501","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=297501"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/297501\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}