[
  {
    "path": "CustomOutline-CameraIndependent.shader",
    "content": "// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'\n\n// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\nShader \"Outlined/Custom Camera Independent\" {\n\tProperties {\n\t\t_Color (\"Main Color\", Color) = (.5,.5,.5,1)\n\t\t_OutlineColor (\"Outline Color\", Color) = (0,0,0,1)\n\t\t_Outline2 (\"Outline width\", Range (0, 1)) = .1\n\t\t_MainTex (\"Base (RGB)\", 2D) = \"white\" { }\n\t}\n \nCGINCLUDE\n#include \"UnityCG.cginc\"\n \nstruct appdata {\n\tfloat4 vertex : POSITION;\n\tfloat3 normal : NORMAL;\n};\n \nstruct v2f {\n\tfloat4 pos : POSITION;\n\tfloat4 color : COLOR;\n};\n \nuniform float _Outline2;\nuniform float4 _OutlineColor;\n \nv2f vert(appdata v) {\n\t// just make a copy of incoming vertex data but scaled according to normal direction\n\tv2f o;\n\n\t//Camera position in world\n\tfloat3 targetPos = _WorldSpaceCameraPos;\n\n\t//Object position in world\n\tfloat3 objectPos = mul (unity_ObjectToWorld, v.vertex).xyz;\n\n\t//Vertex offset from center of the object\n\tfloat3 offset = v.vertex.xyz;\n\n\t//Distance from the object to the camera\n\tfloat dist = distance(objectPos, targetPos + offset);\n\n\t//Forward vector of the camera\n\tfloat3 viewDir = UNITY_MATRIX_IT_MV[2].xyz;\n\n\t//Vector between vertex and offseted camera pos\n\tfloat3 distVec = objectPos - (targetPos + offset);\n\n\t//Angle between two vectors\n\tfloat angle = distVec - distVec;\n\t//float angle = atan2(normalize(cross(distVec,viewDir)), dot(distVec,viewDir));\n\n\t//Real distance (to the plane 90 degrees to camera forward and object)\n\tfloat finalDist = dist * cos(degrees(angle));\n\n\t//v.vertex *= ( 2 );\n\tv.vertex *= finalDist * _Outline2;\n\n\t//v.vertex *= -1;\n\n\to.pos = UnityObjectToClipPos(v.vertex);\n\n\to.color = _OutlineColor;\n\treturn o;\n}\nENDCG\n \n\tSubShader {\n\t\t//Tags {\"Queue\" = \"Geometry+100\" }\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\t// note that a vertex shader is specified here but its using the one above\n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n\t\t\t//Offset 50,50\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\thalf4 frag(v2f i) :COLOR { return i.color; }\n\t\t\tENDCG\n\t\t}\n\t}\n \n\tSubShader {\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma exclude_renderers gles xbox360 ps3\n\t\t\tENDCG\n\t\t\tSetTexture [_MainTex] { combine primary }\n\t\t}\n\t}\n \n\tFallback \"Diffuse\"\n}\n"
  },
  {
    "path": "CustomOutline-ConstantWidth.shader",
    "content": "// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\nShader \"Outlined/Custom Constant Width\" {\n\tProperties {\n\t\t_Color (\"Main Color\", Color) = (.5,.5,.5,1)\n\t\t_OutlineColor (\"Outline Color\", Color) = (0,0,0,1)\n\t\t_Outline (\"Outline width\", Range (0, 5)) = .1\n\t\t_Limiter (\"Outline width limiter\", Range (0, 5)) = 0\n\t\t_MainTex (\"Base (RGB)\", 2D) = \"white\" { }\n\t}\n \nCGINCLUDE\n#include \"UnityCG.cginc\"\n \nstruct appdata {\n\tfloat4 vertex : POSITION;\n\tfloat3 normal : NORMAL;\n};\n \nstruct v2f {\n\tfloat4 pos : POSITION;\n\tfloat4 color : COLOR;\n};\n \nuniform float _Outline;\nuniform float _Limiter;\nuniform float4 _OutlineColor;\n \nv2f vert(appdata v) {\n\n\tv2f o;\n\n\t//Original concept of using FOV\n\t//float t = unity_CameraProjection._m11;\n    //const float Rad2Deg = 180 / UNITY_PI;\n    //float fov = atan(1.0f / t ) * 2.0 * Rad2Deg;\n\n    //if(fov < _Limiter){\n    //\tfov = _Limiter;\n    //}\n\n    float multiplier = unity_OrthoParams.x * 0.1;\n\n    if(multiplier < _Limiter){\n    \tmultiplier = _Limiter;\n    }\n\n\tv.vertex *=  _Outline * multiplier;\n\n\to.pos = UnityObjectToClipPos(v.vertex);\n\n\to.color = _OutlineColor;\n\treturn o;\n}\nENDCG\n \n\tSubShader {\n\t\t//Tags {\"Queue\" = \"Geometry+100\" }\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\t// note that a vertex shader is specified here but its using the one above\n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n\t\t\t//Offset 50,50\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\thalf4 frag(v2f i) :COLOR { return i.color; }\n\t\t\tENDCG\n\t\t}\n\t}\n \n\tSubShader {\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma exclude_renderers gles xbox360 ps3\n\t\t\tENDCG\n\t\t\tSetTexture [_MainTex] { combine primary }\n\t\t}\n\t}\n \n\tFallback \"Diffuse\"\n}\n"
  },
  {
    "path": "CustomOutline.shader",
    "content": "// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\nShader \"Outlined/Custom\" {\n\tProperties {\n\t\t_Color (\"Main Color\", Color) = (.5,.5,.5,1)\n\t\t_OutlineColor (\"Outline Color\", Color) = (0,0,0,1)\n\t\t_Outline (\"Outline width\", Range (0, 1)) = .1\n\t\t_MainTex (\"Base (RGB)\", 2D) = \"white\" { }\n\t}\n \nCGINCLUDE\n#include \"UnityCG.cginc\"\n \nstruct appdata {\n\tfloat4 vertex : POSITION;\n\tfloat3 normal : NORMAL;\n};\n \nstruct v2f {\n\tfloat4 pos : POSITION;\n\tfloat4 color : COLOR;\n};\n \nuniform float _Outline;\nuniform float4 _OutlineColor;\n \nv2f vert(appdata v) {\n\t// just make a copy of incoming vertex data but scaled according to normal direction\n\tv2f o;\n\n\tv.vertex *= ( 1 + _Outline);\n\n\to.pos = UnityObjectToClipPos(v.vertex);\n \n\t//float3 norm   = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal));\n\t//float2 offset = TransformViewToProjection(norm.xy);\n\n\to.color = _OutlineColor;\n\treturn o;\n}\nENDCG\n \n\tSubShader {\n\t\t//Tags {\"Queue\" = \"Geometry+100\" }\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\t// note that a vertex shader is specified here but its using the one above\n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n\t\t\t//Offset 50,50\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\thalf4 frag(v2f i) :COLOR { return i.color; }\n\t\t\tENDCG\n\t\t}\n\t}\n \n\tSubShader {\nCGPROGRAM\n#pragma surface surf Lambert\n \nsampler2D _MainTex;\nfixed4 _Color;\n \nstruct Input {\n\tfloat2 uv_MainTex;\n};\n \nvoid surf (Input IN, inout SurfaceOutput o) {\n\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\to.Albedo = c.rgb;\n\to.Alpha = c.a;\n}\nENDCG\n \n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"LightMode\" = \"Always\" }\n\t\t\tCull Front\n\t\t\tZWrite On\n\t\t\tColorMask RGB\n\t\t\tBlend SrcAlpha OneMinusSrcAlpha\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma exclude_renderers gles xbox360 ps3\n\t\t\tENDCG\n\t\t\tSetTexture [_MainTex] { combine primary }\n\t\t}\n\t}\n \n\tFallback \"Diffuse\"\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Luke Kabat\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Outlined Diffuse Shader Fixed for Unity 5.6\nThis is a fixed version of diffused outline shader from http://wiki.unity3d.com/index.php/Outlined_Diffuse_3\nIt should be working fine in Unity 5.6 and above.\n\n# Important update:\n**A new version of the outline shader is available, go to: https://github.com/Shrimpey/UltimateOutline\nUse the updated shader, come back here only if you find it to be working weirdly on your custom models and try some of the ones mentioned below.**\n\n**Guide:**\nI suggest you trying **UniformOutline.shader** and then **CustomOutline.shader**. They should work fine for simple objects/complex objects with proper origin. If they fail - try out the **RegularOutline.shader**. The rest of the shaders are for really specyfic purposes, so unless you know what you're doing you probably shouldn't be using them :)\n\n**Showcase:**\nDownload **OutlineShowcase.unitypackage** and import it to Unity project to see RegularOutline, CustomOutline and UniformOutline shaders in action.\n\n**Shaders:**\n\n# RegularOutline.shader\n**RegularOutline.shader** - Just an updated version of the shader from the wiki page, may still work in weird ways => if so, use custom one.\n![Regular Outline](/images/standard.PNG?raw=true \"Regular Outline\")\n**Usage**: Curved shapes/thin outlines.\n**Problems**: Weird shapes on hard edges.\n\n---\n# CustomOutline.shader\n**CustomOutline.shader** - My personal take on the outline shader. It increases the scale of the vertices instead of working with normals. \n![Custom Outline](/images/custom.PNG?raw=true \"Custom Outline\")\n**Usage**: All shapes\n**Problems**: Possible clipping on really thick edges/weird offsets if model's origin is not in center\n\n---\n# UniformOutline.shader\n**UniformOutline.shader** - Made from scratch, works just like CustomOutline except the scaling is more uniform - width of the outline should be more consistent on irregular meshes (easy to notice when comparing the wheels of the cart from the image below to the Custom Outline shader image). \n\n![Uniform Outline](/images/Uniform.PNG?raw=true \"Uniform Outline\")\n\n**Usage**: All shapes\n**Problems**: Same as in Custom Outline, less overlaying, more angled distortions.\n\n---\n# CustomOutline-CameraIndependent.shader\n**CustomOutline-CameraIndependent.shader** - Same as custom one, but the outline is the same width despite the distance to the camera. \n\n![Camera Independend Close](/images/camera.PNG?raw=true \"Camera Independend Close\")\n![Camera Independend Far](/images/camera2.PNG?raw=true \"Camera Independend Far\")\n\n**Usage**: Same sized outline on perspective camera.\n**Problems**: Weird shapes on complex objects.\n\n---\n# CustomOutline-ConstantWidth.shader\n**CustomOutline-ConstantWidth.shader** - Same as custom one, but the outline is constant width despite the camera zoom.\n\n![Constant Width Zoomed In](/images/zoom2.PNG?raw=true \"Constant Width Zoomed In\")\n![Constant Width Zoomed Out](/images/zoom.PNG?raw=true \"Constant Width Zoomed Out\")\n\n**Usage**: Same outline width despite the camera's zoom (ortho/perspective)\n**Problems**: Clipping on thick outlines on complex shapes.\n\n---\n\n\n*UPDATE 03.09.2017 - Added camera independent version of custom shader*\n\n*UPDATE 04.09.2017 - Added constant size version of custom shader | updated README to include images*\n\n*UPDATE 12.09.2017 - Added uniform outline shader*\n\n*UPDATE 23.12.2017 - Fixed some minor issues with custom, regular and uniform shaders | added showcase unity package*\n"
  },
  {
    "path": "RegularOutline.shader",
    "content": "Shader \"Outlined/Regular\" {\n\tProperties {\n\t\t_Color (\"Main Color\", Color) = (.5,.5,.5,1)\n\t\t_OutlineColor (\"Outline Color\", Color) = (0,0,0,1)\n\t\t_Outline (\"Outline width\", Range (0, 1)) = .1\n\t\t_MainTex (\"Base (RGB)\", 2D) = \"white\" { }\n\t}\n \nCGINCLUDE\n#include \"UnityCG.cginc\"\n \nstruct appdata {\n\tfloat4 vertex : POSITION;\n\tfloat3 normal : NORMAL;\n};\n \nstruct v2f {\n\tfloat4 pos : POSITION;\n\tfloat4 color : COLOR;\n};\n \nuniform float _Outline;\nuniform float4 _OutlineColor;\n \nv2f vert(appdata v) {\n\t// just make a copy of incoming vertex data but scaled according to normal direction\n\tv2f o;\n\to.pos = mul(UNITY_MATRIX_MVP, v.vertex);\n \n\tfloat3 norm   = mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal);\n\tfloat2 offset = TransformViewToProjection(norm.xy);\n \n\to.pos.xy += offset * o.pos.z * _Outline;\n\to.color = _OutlineColor;\n\treturn o;\n}\nENDCG\n \n\tSubShader {\n\t\tTags { \"Queue\" = \"Transparent\" \"IgnoreProjector\" = \"True\"}\n\t\tCull Back\n\t\tCGPROGRAM\n\t\t#pragma surface surf Lambert\n\t\t \n\t\tsampler2D _MainTex;\n\t\tfixed4 _Color;\n\t\t \n\t\tstruct Input {\n\t\t\tfloat2 uv_MainTex;\n\t\t};\n\t\t \n\t\tvoid surf (Input IN, inout SurfaceOutput o) {\n\t\t\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\t\t\to.Albedo = c.rgb;\n\t\t\to.Alpha = c.a;\n\t\t}\n\t\tENDCG\n\n\t\tPass {\n\t\t\tName \"OUTLINE\"\n\t\t\tTags { \"Queue\" = \"Transparent\" \"IgnoreProjector\" = \"True\"}\n\t\t\tCull Front\n\t\t\tZWrite Off\n\t\t\t//ZTest Less\n\t\t\t//Offset 1, 1\n \n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\thalf4 frag(v2f i) :COLOR { return i.color; }\n\t\t\tENDCG\n\t\t}\n\t}\n \n\tFallback \"Diffuse\"\n}\n"
  },
  {
    "path": "UniformOutline.shader",
    "content": "Shader \"Outlined/Uniform\"\n{\n\tProperties\n\t{\n\t\t_Color(\"Main Color\", Color) = (0.5,0.5,0.5,1)\n\t\t_MainTex (\"Texture\", 2D) = \"white\" {}\n\t\t_OutlineColor (\"Outline color\", Color) = (0,0,0,1)\n\t\t_OutlineWidth (\"Outlines width\", Range (0.0, 2.0)) = 1.1\n\t}\n\n\tCGINCLUDE\n\t#include \"UnityCG.cginc\"\n\n\tstruct appdata\n\t{\n\t\tfloat4 vertex : POSITION;\n\t};\n\n\tstruct v2f\n\t{\n\t\tfloat4 pos : POSITION;\n\t};\n\n\tuniform float _OutlineWidth;\n\tuniform float4 _OutlineColor;\n\tuniform sampler2D _MainTex;\n\tuniform float4 _Color;\n\n\tENDCG\n\n\tSubShader\n\t{\n\t\tTags{ \"Queue\" = \"Transparent\" \"IgnoreProjector\" = \"True\" }\n\n\t\tPass //Outline\n\t\t{\n\t\t\tZWrite Off\n\t\t\tCull Back\n\t\t\tCGPROGRAM\n\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\n\t\t\tv2f vert(appdata v)\n\t\t\t{\n\t\t\t\tappdata original = v;\n\t\t\t\tv.vertex.xyz += _OutlineWidth * normalize(v.vertex.xyz);\n\n\t\t\t\tv2f o;\n\t\t\t\to.pos = UnityObjectToClipPos(v.vertex);\n\t\t\t\treturn o;\n\n\t\t\t}\n\n\t\t\thalf4 frag(v2f i) : COLOR\n\t\t\t{\n\t\t\t\treturn _OutlineColor;\n\t\t\t}\n\n\t\t\tENDCG\n\t\t}\n\n\t\tTags{ \"Queue\" = \"Geometry\"}\n\n\t\tCGPROGRAM\n\t\t#pragma surface surf Lambert\n\t\t \n\t\tstruct Input {\n\t\t\tfloat2 uv_MainTex;\n\t\t};\n\t\t \n\t\tvoid surf (Input IN, inout SurfaceOutput o) {\n\t\t\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\t\t\to.Albedo = c.rgb;\n\t\t\to.Alpha = c.a;\n\t\t}\n\t\tENDCG\n\t}\n\tFallback \"Diffuse\"\n}\n"
  },
  {
    "path": "triangleOutline.shader",
    "content": "Shader \"Outlined/Triangle\"\n{\n\tProperties\n\t{\n\t\t_Color(\"Main Color\", Color) = (0.5,0.5,0.5,1)\n\t\t_MainTex (\"Texture\", 2D) = \"white\" {}\n\t\t_OutlineColor (\"Outline color\", Color) = (0,0,0,1)\n\t\t_OutlineWidth (\"Outlines width\", Range (0.0, 2.0)) = 1.1\n\t}\n\n\tCGINCLUDE\n\t#include \"UnityCG.cginc\"\n\n\tstruct appdata\n\t{\n\t\tfloat4 vertex : POSITION;\n\t};\n\n\tstruct v2f\n\t{\n\t\tfloat4 pos : POSITION;\n\t};\n\n\tuniform float _OutlineWidth;\n\tuniform float4 _OutlineColor;\n\tuniform sampler2D _MainTex;\n\tuniform float4 _Color;\n\n\tENDCG\n\n\tSubShader\n\t{\n\t\tTags{ \"Queue\" = \"Transparent\" \"IgnoreProjector\" = \"True\" }\n\n\t\tPass //Outline\n\t\t{\n\t\t\tZWrite Off\n\t\t\tCull Back\n\t\t\tCGPROGRAM\n\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\n\t\t\tv2f vert(appdata v)\n\t\t\t{\n\t\t\t\tappdata original = v;\n\t\t\t\tv.vertex.xyzw += _OutlineWidth * normalize(v.vertex.xyzw);\n\t\t\t\tv.vertex.x -= _OutlineWidth/4;\n\t\t\t\tv.vertex.y += _OutlineWidth/4;\n\n\t\t\t\tv2f o;\n\t\t\t\to.pos = UnityObjectToClipPos(v.vertex);\n\t\t\t\treturn o;\n\n\t\t\t}\n\n\t\t\thalf4 frag(v2f i) : COLOR\n\t\t\t{\n\t\t\t\treturn _OutlineColor;\n\t\t\t}\n\n\t\t\tENDCG\n\t\t}\n\n\t\tTags{ \"Queue\" = \"Geometry\"}\n\n\t\tCGPROGRAM\n\t\t#pragma surface surf Lambert\n\t\t \n\t\tstruct Input {\n\t\t\tfloat2 uv_MainTex;\n\t\t};\n\t\t \n\t\tvoid surf (Input IN, inout SurfaceOutput o) {\n\t\t\tfixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;\n\t\t\to.Albedo = c.rgb;\n\t\t\to.Alpha = c.a;\n\t\t}\n\t\tENDCG\n\t}\n\tFallback \"Diffuse\"\n}\n"
  }
]