   Light pre-pass: still problems
  Hi guys!   I'm developing my engine on different aspects...after some times I've returned on my light pre-pass shader, but I say some problems...Screenshots helps understand better ;)http://img410.imageshack.us/my.php?image=lightprepassproblem01.jpghttp://img207.imageshack.us/my.php?image=lightprepassproblem02.jpgI've tried to simplify the code much and to calculate only the diffuse term for now, but when I move the light on x-z plane the base plane get colored...is it normal? I don't think so. The other objects are colored well...This is the code of the light buffer creation...vertexOutput lightVS(appdata IN){vertexOutput OUT = (vertexOutput)0;OUT.HPosition = float4(IN.Position, 1.0f);   float4 Po = float4(IN.Position.xyz, 1);   float3 Pw = mul(Po, gWorldXf).xyz;OUT.TexCoord0 = IN.UV.xy + QuadTexelOffsets;OUT.TexCoord1 = IN.UV.xy + QuadTexelOffsets;OUT.Position2 = float4(normalize(gViewIXf[3].xyz - Pw), 1.0);return OUT;}half4 lightNewPS( vertexOutput IN ) : COLOR0{half4 G_Buffer = tex2D(NormSampler, IN.TexCoord0);half Z;half3 N;UnpackDepthNormal(G_Buffer, Z, N);float3 pixelPos = normalize(IN.Position2.xyz) * Z;float lightAtt0 = 100.0f;float3 lightDir = (gPoint0Position - pixelPos) * 0.001;lightDir = normalize(lightDir);float lightAtt = saturate(1 - dot(lightDir / lightAtt0, lightDir / lightAtt0));float NdotL0 = dot(lightDir, N) * lightAtt;float att = 0.7f;return half4(att * NdotL0, att * NdotL0, att * NdotL0, 0.0); }Thanks guys, sorry to bother!   