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.

66 lines
3.1 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/Stencil Example/StencilDiffuse01"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] __dirty( "", Int ) = 1
  8. _Color("_Color", Color) = (1,1,1,1)
  9. _Albedo("Albedo", 2D) = "white" {}
  10. _Normal("Normal", 2D) = "bump" {}
  11. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  12. }
  13. SubShader
  14. {
  15. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+1" }
  16. Cull Back
  17. Stencil
  18. {
  19. Ref 1
  20. Comp Equal
  21. Pass Keep
  22. Fail Keep
  23. }
  24. CGPROGRAM
  25. #pragma target 3.0
  26. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  27. struct Input
  28. {
  29. float2 uv_texcoord;
  30. };
  31. uniform sampler2D _Normal;
  32. uniform float4 _Normal_ST;
  33. uniform sampler2D _Albedo;
  34. uniform float4 _Albedo_ST;
  35. uniform float4 _Color;
  36. void surf( Input i , inout SurfaceOutputStandard o )
  37. {
  38. float2 uv_Normal = i.uv_texcoord * _Normal_ST.xy + _Normal_ST.zw;
  39. o.Normal = UnpackNormal( tex2D( _Normal, uv_Normal ) );
  40. float2 uv_Albedo = i.uv_texcoord * _Albedo_ST.xy + _Albedo_ST.zw;
  41. o.Albedo = ( tex2D( _Albedo, uv_Albedo ) * _Color ).xyz;
  42. o.Alpha = 1;
  43. }
  44. ENDCG
  45. }
  46. Fallback "Diffuse"
  47. CustomEditor "ASEMaterialInspector"
  48. }
  49. /*ASEBEGIN
  50. Version=11010
  51. 541;29;1066;1004;853;154.5;1;True;False
  52. Node;AmplifyShaderEditor.ColorNode;2;-549,68.5;Float;False;Property;_Color;_Color;-1;0;1,1,1,1;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  53. Node;AmplifyShaderEditor.SamplerNode;1;-560,-141.5;Float;True;Property;_Albedo;Albedo;-1;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
  54. Node;AmplifyShaderEditor.SamplerNode;4;-462,271.5;Float;True;Property;_Normal;Normal;-1;0;None;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
  55. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-198,-39.5;Float;False;2;2;0;FLOAT4;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;FLOAT4
  56. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;0,0;Float;False;True;2;Float;ASEMaterialInspector;0;Standard;ASESampleShaders/Stencil Example/StencilDiffuse01;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;0;False;1.2;2.1;Opaque;0.5;True;True;1;False;Opaque;Geometry;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;1;255;255;5;1;1;0;False;0;4;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;0;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;5;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;OBJECT;0.0;False;11;FLOAT3;0.0,0,0;False;12;FLOAT3;0.0,0,0;False;14;FLOAT4;0.0,0,0,0;False;15;FLOAT3;0,0,0;False;0
  57. WireConnection;3;0;1;0
  58. WireConnection;3;1;2;0
  59. WireConnection;0;0;3;0
  60. WireConnection;0;1;4;0
  61. ASEEND*/
  62. //CHKSM=7206DCC34D8802E2CC056B77F49C823163915186