I noticed that in some vertex shaders they invert the Z coordinate of the light vector, i.e.
// Compute denormalized light vector in world space
float3 vLightWS = g_LightPosition.xyz - vPositionWS.xyz;
// Need to invert Z for correct lighting
vLightWS.z = -vLightWS.z;
Shouldn't be that the light vector starts at the light's position and ends at the vertex position, but in order to use it in the diffuse lighting calculation it is reverted to start at the vertex position and end at the light's position as float3 vLightWS = g_LightPosition.xyz - vPostionWS.xyz
suggests?
In this case what is the meaning of the Z coordinate inversion?