How to blur image to fake soft shadow?

Hi, I don’t know much about writing shaders but I managed to get this working on a Projector that uses a Render Texture. Problem is it is hard and I would like to be able to control a blur to it to soften it. I don’t yet know how to use CGPROGRAM stuff :confused: and really try to use Shader Forge for shaders but I can’t for this. Please help :smile:

1868359--120027--Example.png

Shader "Custom/RTSProjector"
{
  Properties
  {
     _Color ("Main Color", Color) = (1,1,1,1)    
     _ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
     _FalloffTex ("FallOff", 2D) = "white" { TexGen ObjectLinear }
  }
  Subshader {
     Tags { "RenderType"="Transparent-1" }
     Pass {
        ZWrite Off
        AlphaTest Greater 0
        Offset -1, -1
        ColorMask RGB
        Blend DstColor Zero
        Color [_Color]
        SetTexture [_ShadowTex] {
            constantColor [_Color]
            combine texture alpha * constant
            Matrix [_Projector]
        }
        SetTexture [_FalloffTex] {
           constantColor (0,0,0,0)
           combine previous lerp (texture) constant
           Matrix [_ProjectorClip]
        }
     }
  }
}

I tried adding a Blur Image Effect to the camera rendering the texture but it doesn’t work, I presume what needs to be done is blurring the alpha channel of the Render Texture.
1868382--120029--Example2.png

So, it looks like I can get it to work using the Image Effect on the camera but I know it can be done directly in the shader as well and would very much appreciate if someone could post this shader setup with a blur since I expect it would be more efficient than using the Image Effect. Thanks.

Shader "Custom/RTSProjector"
{
  Properties
  {
     _Color ("Main Color", Color) = (1,1,1,1)    
     _ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
     _FalloffTex ("FallOff", 2D) = "white" { TexGen ObjectLinear }
  }
  Subshader {
     Tags { "RenderType"="Transparent-1" }
     Pass
     {
        ZWrite Off
        Fog { Color (1, 1, 1) }
        AlphaTest Greater 0
        ColorMask RGB
        Blend SrcAlpha OneMinusSrcAlpha
        Offset -1, -1
        Color [_Color]
        SetTexture [_ShadowTex]
        {
            constantColor [_Color]
            combine texture alpha * constant
            Matrix [_Projector]
        }
        SetTexture [_FalloffTex]
        {
           constantColor (0,0,0,0)
           combine previous lerp (texture) constant
           Matrix [_ProjectorClip]
        }
     }
  }
}