sorry about misunderstanding.

```
Here is Pixel shader
float4 OmniLightPS(VertexToPixel PSIn) : COLOR0
{
//We calculate in world space
//simple transform into world space (where one pixel is one world unit), this is our current point on background plane
float3 pointWS;
pointWS.xy = (PSIn.TexCoord.xy) * viewport;
pointWS.z = -planeDistance;
//Vector between light and point
float3 lightVec = lightPos - pointWS;
//vector from plane we are projecting to, I leave this as whole float3 so its obvious what that was in equation, reduce this to float
float3 w = float3(0,0, -lightPos.z);
//light vec is from point to light so whole thing is *-1 which remove negative signs
float s = w.z / lightVec.z;
float3 samplePoint = lightPos + s * lightVec;
//sample texture, don't forget to get sample point coordinates back to screen space
float shadowTerm= tex2D(Sampler, samplePoint,xy/ viewport).a; //as Sample point Z is 0 as that was plane were targeting
//calculate attenuation
float intensity = saturate(1.0f - length(lightVec) / (attuneation)) ; //sorry about type in attenuation
return float4(PSIn.Color.rgb * intensity * (1 - shadowTerm) ,1);
}
```