It seems that the lighting direction must be normalized. This fixes lots of lighting issues mostly shown in the d3d backend.