Looking for some inside in light shader for 2d scene that is using multiple layers.

this works:

```
float4 PixelShaderFunction(float4 pos : SV_POSITION, float4 color1 : COLOR0, float2 texCoord : TEXCOORD0) : SV_TARGET0
{
float4 tex = tex2D(TextureSampler, texCoord);
if (tex.a != 0)
{
float4 texNormal = tex2D(Sampler, texCoord) - float4(.5, .5, .5, .5);
if (texNormal.a != 0)
{
float3 texC3;
texC3.x = texCoord.x * (xWidth);
texC3.y = texCoord.y * (xHeight);
texC3.z = 0;
float4 shadingResult = float4(0, 0, 0, 0);
float3 displacement = normalize(xLightPosition.xyz - texC3);
float intensity = dot(texNormal.xyz, displacement);
shadingResult += intensity * xLightColor;
float3 halfvector = normalize(displacement + float3(0, 0, -1.0));
float specintensity = pow(saturate(dot(halfvector, texNormal.xyz)), .1);
shadingResult += specintensity * xLightColor;
shadingResult += float4(.4, .4, .4, 1.0f);
return saturate(tex * shadingResult * color1);
}
return tex;
}
return tex;
}
```

Ingame Screenshot

Normalmap

Spriteilluminator

I am using normal maps,created with the tool “spriteilluminator”

I could need a shader where i get the same result in game and in tool. That would be really helpful.