You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
3.9 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/SimpleTerrainBase"
  4. {
  5. Properties
  6. {
  7. _MainTex("MainTex", 2D) = "white" {}
  8. _MetallicTex("MetallicTex", 2D) = "white" {}
  9. _Color("Color", Color) = (0,0,0,0)
  10. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  11. [HideInInspector] __dirty( "", Int ) = 1
  12. }
  13. SubShader
  14. {
  15. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry-100" }
  16. Cull Back
  17. CGPROGRAM
  18. #include "UnityPBSLighting.cginc"
  19. #pragma target 3.0
  20. #pragma exclude_renderers gles
  21. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  22. struct Input
  23. {
  24. float2 uv_texcoord;
  25. };
  26. uniform float4 _Color;
  27. uniform sampler2D _MainTex;
  28. uniform float4 _MainTex_ST;
  29. uniform sampler2D _MetallicTex;
  30. uniform float4 _MetallicTex_ST;
  31. void surf( Input i , inout SurfaceOutputStandard o )
  32. {
  33. float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
  34. float4 tex2DNode1 = tex2D( _MainTex, uv_MainTex );
  35. float4 lerpResult6 = lerp( _Color , tex2DNode1 , 1.0);
  36. o.Albedo = lerpResult6.rgb;
  37. float2 uv_MetallicTex = i.uv_texcoord * _MetallicTex_ST.xy + _MetallicTex_ST.zw;
  38. o.Metallic = tex2D( _MetallicTex, uv_MetallicTex ).r;
  39. o.Smoothness = tex2DNode1.a;
  40. o.Alpha = 1;
  41. }
  42. ENDCG
  43. }
  44. Fallback "Diffuse"
  45. CustomEditor "ASEMaterialInspector"
  46. }
  47. /*ASEBEGIN
  48. Version=15309
  49. 384;92;912;786;1363.454;1234.883;2.393694;True;False
  50. Node;AmplifyShaderEditor.RangedFloatNode;7;-177.8696,-77.96332;Float;False;Constant;_Float0;Float 0;3;0;Create;True;0;0;False;0;1;0;0;0;0;1;FLOAT;0
  51. Node;AmplifyShaderEditor.ColorNode;3;-438.2947,-311.1361;Float;False;Property;_Color;Color;2;0;Create;True;0;0;False;0;0,0,0,0;1,1,1,1;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  52. Node;AmplifyShaderEditor.SamplerNode;1;-504.606,-102.3367;Float;True;Property;_MainTex;MainTex;0;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
  53. Node;AmplifyShaderEditor.LerpOp;6;-50.86963,-254.9633;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  54. Node;AmplifyShaderEditor.SamplerNode;2;-500.1052,129.9338;Float;True;Property;_MetallicTex;MetallicTex;1;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
  55. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;173,1;Float;False;True;2;Float;ASEMaterialInspector;0;0;Standard;ASESampleShaders/SimpleTerrainBase;False;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;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;-100;False;Opaque;;Geometry;All;True;True;True;False;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;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;-1;False;-1;-1;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;1;UnityPBSLighting.cginc;0;0;False;0;0;0;False;-1;-1;0;False;-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
  56. WireConnection;6;0;3;0
  57. WireConnection;6;1;1;0
  58. WireConnection;6;2;7;0
  59. WireConnection;0;0;6;0
  60. WireConnection;0;3;2;1
  61. WireConnection;0;4;1;4
  62. ASEEND*/
  63. //CHKSM=E2C30E3F834E46FCDAABAB1E4FF45294EB925D9E