|
// Made with Amplify Shader Editor
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
|
Shader "Custom/Outline"
|
|
{
|
|
Properties
|
|
{
|
|
_OutlineColor("OutlineColor", Color) = (0.4861605,0.2249911,0.6037736,1)
|
|
_OutlineWidth("OutlineWidth", Float) = 0.1
|
|
[HideInInspector] __dirty( "", Int ) = 1
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
Tags{ }
|
|
Cull Front
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
#pragma surface outlineSurf Outline nofog keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:outlineVertexDataFunc
|
|
|
|
|
|
|
|
struct Input
|
|
{
|
|
half filler;
|
|
};
|
|
uniform float _OutlineWidth;
|
|
uniform float4 _OutlineColor;
|
|
|
|
void outlineVertexDataFunc( inout appdata_full v, out Input o )
|
|
{
|
|
UNITY_INITIALIZE_OUTPUT( Input, o );
|
|
float outlineVar = _OutlineWidth;
|
|
v.vertex.xyz += ( v.normal * outlineVar );
|
|
}
|
|
inline half4 LightingOutline( SurfaceOutput s, half3 lightDir, half atten ) { return half4 ( 0,0,0, s.Alpha); }
|
|
void outlineSurf( Input i, inout SurfaceOutput o )
|
|
{
|
|
o.Emission = _OutlineColor.rgb;
|
|
}
|
|
ENDCG
|
|
|
|
|
|
Tags{ "RenderType" = "Overlay" "Queue" = "Overlay+0" }
|
|
Cull Back
|
|
ZWrite On
|
|
ZTest Always
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
#pragma surface surf Unlit keepalpha addshadow fullforwardshadows exclude_path:deferred vertex:vertexDataFunc
|
|
struct Input
|
|
{
|
|
half filler;
|
|
};
|
|
|
|
void vertexDataFunc( inout appdata_full v, out Input o )
|
|
{
|
|
UNITY_INITIALIZE_OUTPUT( Input, o );
|
|
float3 temp_output_3_0 = 0;
|
|
v.vertex.xyz += temp_output_3_0;
|
|
v.normal = temp_output_3_0;
|
|
}
|
|
|
|
inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
|
|
{
|
|
return half4 ( 0, 0, 0, s.Alpha );
|
|
}
|
|
|
|
void surf( Input i , inout SurfaceOutput o )
|
|
{
|
|
o.Alpha = 1;
|
|
}
|
|
|
|
ENDCG
|
|
}
|
|
Fallback "Diffuse"
|
|
CustomEditor "ASEMaterialInspector"
|
|
}
|
|
/*ASEBEGIN
|
|
Version=16200
|
|
43;8;1906;1010;1105.214;441.5715;1.378491;True;False
|
|
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
|
|
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
|
|
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
|
|
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
|
|
WireConnection;3;0;4;0
|
|
WireConnection;3;1;5;0
|
|
WireConnection;2;11;3;0
|
|
WireConnection;2;12;3;0
|
|
ASEEND*/
|
|
//CHKSM=B57BE09DD66D38847A9D58D365DA5313B6AE01BC
|