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.

89 lines
3.7 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "Custom/Outline"
  4. {
  5. Properties
  6. {
  7. _OutlineColor("OutlineColor", Color) = (0.4861605,0.2249911,0.6037736,1)
  8. _OutlineWidth("OutlineWidth", Float) = 0.1
  9. [HideInInspector] __dirty( "", Int ) = 1
  10. }
  11. SubShader
  12. {
  13. Tags{ }
  14. Cull Front
  15. CGPROGRAM
  16. #pragma target 3.0
  17. #pragma surface outlineSurf Outline nofog keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:outlineVertexDataFunc
  18. struct Input
  19. {
  20. half filler;
  21. };
  22. uniform float _OutlineWidth;
  23. uniform float4 _OutlineColor;
  24. void outlineVertexDataFunc( inout appdata_full v, out Input o )
  25. {
  26. UNITY_INITIALIZE_OUTPUT( Input, o );
  27. float outlineVar = _OutlineWidth;
  28. v.vertex.xyz += ( v.normal * outlineVar );
  29. }
  30. inline half4 LightingOutline( SurfaceOutput s, half3 lightDir, half atten ) { return half4 ( 0,0,0, s.Alpha); }
  31. void outlineSurf( Input i, inout SurfaceOutput o )
  32. {
  33. o.Emission = _OutlineColor.rgb;
  34. }
  35. ENDCG
  36. Tags{ "RenderType" = "Overlay" "Queue" = "Overlay+0" }
  37. Cull Back
  38. ZWrite On
  39. ZTest Always
  40. CGPROGRAM
  41. #pragma target 3.0
  42. #pragma surface surf Unlit keepalpha addshadow fullforwardshadows exclude_path:deferred vertex:vertexDataFunc
  43. struct Input
  44. {
  45. half filler;
  46. };
  47. void vertexDataFunc( inout appdata_full v, out Input o )
  48. {
  49. UNITY_INITIALIZE_OUTPUT( Input, o );
  50. float3 temp_output_3_0 = 0;
  51. v.vertex.xyz += temp_output_3_0;
  52. v.normal = temp_output_3_0;
  53. }
  54. inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
  55. {
  56. return half4 ( 0, 0, 0, s.Alpha );
  57. }
  58. void surf( Input i , inout SurfaceOutput o )
  59. {
  60. o.Alpha = 1;
  61. }
  62. ENDCG
  63. }
  64. Fallback "Diffuse"
  65. CustomEditor "ASEMaterialInspector"
  66. }
  67. /*ASEBEGIN
  68. Version=16200
  69. 43;8;1906;1010;1105.214;441.5715;1.378491;True;False
  70. Node;AmplifyShaderEditor.ColorNode;4;-422.3701,19.68895;Float;False;Property;_OutlineColor;OutlineColor;1;0;Create;True;0;0;False;0;0.4861605,0.2249911,0.6037736,1;0.4861605,0.2249911,0.6037736,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  71. Node;AmplifyShaderEditor.RangedFloatNode;5;-345.0392,402.4769;Float;False;Property;_OutlineWidth;OutlineWidth;2;0;Create;True;0;0;False;0;0.1;0.1;0;0;0;1;FLOAT;0
  72. Node;AmplifyShaderEditor.OutlineNode;3;32.59119,16.03789;Float;False;0;True;None;0;0;Front;3;0;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT3;0
  73. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;2;1069,6;Float;False;True;2;Float;ASEMaterialInspector;0;0;Unlit;Custom/Outline;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;1;False;-1;7;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;True;0;True;Overlay;;Overlay;ForwardOnly;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;1;False;-1;1;False;-1;0;0;False;-1;0;False;-1;1;False;-1;0;False;-1;0;False;0.01;0,0.9052944,1,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;15;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;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
  74. WireConnection;3;0;4;0
  75. WireConnection;3;1;5;0
  76. WireConnection;2;11;3;0
  77. WireConnection;2;12;3;0
  78. ASEEND*/
  79. //CHKSM=B57BE09DD66D38847A9D58D365DA5313B6AE01BC