Hey there, I've written a chroma keying shader that works well, but I'd like to be able to take it one step further and blur then edges of the resulting image. I'm new to writing shaders, and am not sure how to do this. I've seen plenty of shaders doing a grabpass and blurring whats behind the object, but never the object itself, even less the result of a previous pass. Also what I'm looking to blur is the alpha channel rather than the colors (I just want smooth edges, not a blurry picture!). Here's the code so far: Code (CSharp): Shader "Custom/YCrCb_Dist" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _thresh ("Threshold", Range (0, 255)) = 80 _slope ("Slope", Range (0, 1)) = 0.2 _keyingColor ("Key Color", Color) = (0.8,1,0.8,1) } SubShader { Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} LOD 100 Lighting Off ZWrite Off AlphaTest Off Blend SrcAlpha OneMinusSrcAlpha Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest sampler2D _MainTex; float3 _keyingColor; float _thresh; float _slope; float2 _keyingCrCb; #include "UnityCG.cginc" float4 frag(v2f_img i) : COLOR { float3 ic = tex2D(_MainTex, i.uv).rgb; //transform the keying color to YCrCb (just the CrCb part) _keyingCrCb = float2(128-37.945*_keyingColor.x - 74.494*_keyingColor.y + 112.439*_keyingColor.z, 128+112.439*_keyingColor.x-94.154*_keyingColor.y-18.285*_keyingColor.z); //transform the current pixel's color to YCrCb (just the CrCb part) float2 crcb = float2(128-37.945*ic.x - 74.494*ic.y + 112.439*ic.z, 128+112.439*ic.x-94.154*ic.y-18.285*ic.z); //euclidian cutoff float d = abs(length(abs(_keyingCrCb - crcb))); //little slope to be more forgiving float edge0 = _thresh * (1.0 - _slope); float alpha = smoothstep(edge0, _thresh, d); //slap the alpha value onto the original color return float4(ic, alpha); } ENDCG } } FallBack "Unlit" } How would I go about blurring the resulting texture's alpha channel?