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.

84 lines
3.6 KiB

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. CGPROGRAM
  39. #pragma target 3.0
  40. #pragma surface surf Unlit keepalpha addshadow fullforwardshadows exclude_path:deferred vertex:vertexDataFunc
  41. struct Input
  42. {
  43. half filler;
  44. };
  45. void vertexDataFunc( inout appdata_full v, out Input o )
  46. {
  47. UNITY_INITIALIZE_OUTPUT( Input, o );
  48. v.vertex.xyz += 0;
  49. }
  50. inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
  51. {
  52. return half4 ( 0, 0, 0, s.Alpha );
  53. }
  54. void surf( Input i , inout SurfaceOutput o )
  55. {
  56. o.Alpha = 1;
  57. }
  58. ENDCG
  59. }
  60. Fallback "Diffuse"
  61. CustomEditor "ASEMaterialInspector"
  62. }
  63. /*ASEBEGIN
  64. Version=16200
  65. 73;16;1906;1010;1105.214;441.5715;1.378491;True;False
  66. 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
  67. 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
  68. 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
  69. 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;0;False;-1;0;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;10;False;-1;0;0;False;-1;0;False;-1;0;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
  70. WireConnection;3;0;4;0
  71. WireConnection;3;1;5;0
  72. WireConnection;2;11;3;0
  73. ASEEND*/
  74. //CHKSM=CD936CB78FBFB58CF5751942996F903222F9EC5C