DMeville

Untitled

Apr 26th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.13 KB | None | 0 0
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "Snow"
  4. {
  5.     Properties
  6.     {
  7.         _Color0("Color 0", Color) = (0,0,0,0)
  8.         _Color1("Color 1", Color) = (0,0,0,0)
  9.         _TextureSample0("Texture Sample 0", 2D) = "white" {}
  10.         _SnowCoverage("SnowCoverage", Range( 0 , 1)) = 0
  11.         [Normal]_TextureSample1("Texture Sample 1", 2D) = "white" {}
  12.         [HideInInspector] _texcoord( "", 2D ) = "white" {}
  13.         [HideInInspector] __dirty( "", Int ) = 1
  14.     }
  15.  
  16.     SubShader
  17.     {
  18.         Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" "IsEmissive" = "true"  }
  19.         Cull Back
  20.         CGPROGRAM
  21.         #pragma target 3.0
  22.         #pragma surface surf Standard keepalpha addshadow fullforwardshadows exclude_path:forward
  23.         struct Input
  24.         {
  25.             float2 uv_texcoord;
  26.         };
  27.  
  28.         uniform sampler2D _TextureSample1;
  29.         uniform float4 _TextureSample1_ST;
  30.         uniform float4 _Color0;
  31.         uniform float4 _Color1;
  32.         uniform sampler2D _TextureSample0;
  33.         uniform float4 _TextureSample0_ST;
  34.         uniform float _SnowCoverage;
  35.  
  36.         void surf( Input i , inout SurfaceOutputStandard o )
  37.         {
  38.             float2 uv_TextureSample1 = i.uv_texcoord * _TextureSample1_ST.xy + _TextureSample1_ST.zw;
  39.             o.Normal = tex2D( _TextureSample1, uv_TextureSample1 ).rgb;
  40.             float2 uv_TextureSample0 = i.uv_texcoord * _TextureSample0_ST.xy + _TextureSample0_ST.zw;
  41.             float clampResult8 = clamp( ( tex2D( _TextureSample0, uv_TextureSample0 ).r + ( 1.0 - _SnowCoverage ) ) , 0 , 1 );
  42.             float4 lerpResult1 = lerp( _Color0 , _Color1 , clampResult8);
  43.             o.Albedo = lerpResult1.rgb;
  44.             o.Emission = lerpResult1.rgb;
  45.             o.Alpha = 1;
  46.         }
  47.  
  48.         ENDCG
  49.     }
  50.     Fallback "Diffuse"
  51.     CustomEditor "ASEMaterialInspector"
  52. }
  53. /*ASEBEGIN
  54. Version=15101
  55. -1193;29;1186;1004;1258.387;1087.747;1.693594;True;False
  56. Node;AmplifyShaderEditor.RangedFloatNode;7;-618.5039,119.0065;Float;False;Property;_SnowCoverage;SnowCoverage;3;0;Create;True;0;0;False;0;0;1;0;1;0;1;FLOAT;0
  57. Node;AmplifyShaderEditor.OneMinusNode;5;-308.0183,50.3223;Float;False;1;0;FLOAT;0;False;1;FLOAT;0
  58. Node;AmplifyShaderEditor.SamplerNode;4;-632.5522,-76.74466;Float;True;Property;_TextureSample0;Texture Sample 0;2;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  59. Node;AmplifyShaderEditor.SimpleAddOpNode;6;-99.43251,-55.38451;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  60. Node;AmplifyShaderEditor.ClampOpNode;8;30.44788,-22.14493;Float;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  61. Node;AmplifyShaderEditor.ColorNode;3;-67.05249,-231.4446;Float;False;Property;_Color1;Color 1;1;0;Create;True;0;0;False;0;0,0,0,0;1,1,1,0;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  62. Node;AmplifyShaderEditor.ColorNode;2;-73.55254,-414.7445;Float;False;Property;_Color0;Color 0;0;0;Create;True;0;0;False;0;0,0,0,0;1,1,1,0;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  63. Node;AmplifyShaderEditor.SurfaceDepthNode;10;-215.1333,477.1343;Float;False;0;1;0;FLOAT3;0,0,0;False;1;FLOAT;0
  64. Node;AmplifyShaderEditor.SamplerNode;12;-228.6822,-669.4296;Float;True;Property;_TextureSample1;Texture Sample 1;4;1;[Normal];Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  65. Node;AmplifyShaderEditor.LerpOp;1;254.0473,-244.4454;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  66. Node;AmplifyShaderEditor.WorldPosInputsNode;11;-531.8361,333.1783;Float;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  67. Node;AmplifyShaderEditor.ScreenDepthNode;9;-276.1027,328.0979;Float;False;0;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT;0
  68. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;502.0999,-341.3;Float;False;True;2;Float;ASEMaterialInspector;0;0;Standard;Snow;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;0;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;DeferredOnly;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;OFF;OFF;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;0;0;False;0;0;0;False;-1;-1;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
  69. WireConnection;5;0;7;0
  70. WireConnection;6;0;4;1
  71. WireConnection;6;1;5;0
  72. WireConnection;8;0;6;0
  73. WireConnection;1;0;2;0
  74. WireConnection;1;1;3;0
  75. WireConnection;1;2;8;0
  76. WireConnection;9;0;11;0
  77. WireConnection;0;0;1;0
  78. WireConnection;0;1;12;0
  79. WireConnection;0;2;1;0
  80. ASEEND*/
  81. //CHKSM=A657AAE2DFFE3A307D43B3BB9B20957C9B7E9CAF
Advertisement
Add Comment
Please, Sign In to add comment