First, sorry for the triple post! The forum crashs because it can’t accept the OR symbol, making me unregistered after posting the message! And then can’t delete and there is was no moderator around to solve the problem…
Here is the problem:
The problem is the line of projected texture seen on the right on the pictures. The last picture shows better the ambient where the light is being projected.
I use the next code to generate the texture coordinates (in the vertex shader):
Then in the pixel shader:
if (texCoordProj.z<=0.0) discard; proj = texture2DProj(texProjection,texCoordProj);
The texCoordProj.z<=0.0 gets rid of the backprojection, but that line is always there. Even without texCoordProj.z<=0.0, with the texture being back projected, it still makes that line. I think it may have something to do with the light’s frustum because the line seems parallel to the near clipping plane of the lights frustum… But why?