 <p>Turning comment into answer since it turned out to be the solution:</p> <p>In your shader code you have a varying variable called <code>LightDirection_cameraspace</code>, which you use in your fragment shader computations. But you never assign a value to it in the vertex shader (instead you compute a local variable <code>LightPosition_cameraspace</code> which isn't used further, though). So it probably has some undefined value inside the fragment shader, causing your lighting issues.</p>