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.

68 lines
2.7 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/Outline"
  4. {
  5. Properties
  6. {
  7. _ASEOutlineColor( "Outline Color", Color ) = (0,0.2551723,1,0)
  8. _ASEOutlineWidth( "Outline Width", Float ) = 0.03
  9. [HideInInspector] __dirty( "", Int ) = 1
  10. _Albedo("Albedo", 2D) = "white" {}
  11. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  12. }
  13. SubShader
  14. {
  15. Tags{ }
  16. Cull Front
  17. CGPROGRAM
  18. #pragma target 3.0
  19. #pragma surface outlineSurf Standard keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nofog nometa noforwardadd vertex:outlineVertexDataFunc
  20. struct Input
  21. {
  22. fixed filler;
  23. };
  24. uniform fixed4 _ASEOutlineColor;
  25. uniform fixed _ASEOutlineWidth;
  26. void outlineVertexDataFunc( inout appdata_full v, out Input o )
  27. {
  28. UNITY_INITIALIZE_OUTPUT( Input, o );
  29. v.vertex.xyz += ( v.normal * _ASEOutlineWidth );
  30. }
  31. void outlineSurf( Input i, inout SurfaceOutputStandard o ) { o.Emission = _ASEOutlineColor.rgb; o.Alpha = 1; }
  32. ENDCG
  33. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
  34. Cull Back
  35. ZTest LEqual
  36. CGPROGRAM
  37. #pragma target 3.0
  38. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  39. struct Input
  40. {
  41. float2 uv_texcoord;
  42. };
  43. uniform sampler2D _Albedo;
  44. uniform float4 _Albedo_ST;
  45. void surf( Input i , inout SurfaceOutputStandard o )
  46. {
  47. float2 uv_Albedo = i.uv_texcoord * _Albedo_ST.xy + _Albedo_ST.zw;
  48. o.Albedo = tex2D( _Albedo,uv_Albedo).xyz;
  49. o.Alpha = 1;
  50. }
  51. ENDCG
  52. }
  53. Fallback "Diffuse"
  54. }
  55. /*ASEBEGIN
  56. Version=5004
  57. 758;140;814;548;425.7155;-287.9344;1;True;False
  58. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;147.2,339.6;Fixed;True;2;Fixed;;Standard;ASESampleShaders/Outline;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;3;False;0;0;Opaque;0.5;True;True;0;False;Opaque;Geometry;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;False;0;4;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;Add;Add;0;True;0.03;0,0.2551723,1,0;0;FLOAT3;0,0,0;False;1;FLOAT3;0;False;2;FLOAT3;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0;False;10;OBJECT;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;13;OBJECT;0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False
  59. Node;AmplifyShaderEditor.SamplerNode;1;-163.5004,542.2002;Float;Property;_Albedo;Albedo;-1;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;0;SAMPLER2D;0,0;False;1;FLOAT2;1,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False
  60. WireConnection;0;0;1;0
  61. ASEEND*/
  62. //CHKSM=FB5B5A73DFFEA55DB830C90AB7E155A7DDE235AE