getSpecular should be disabled when gl_FrontMaterial.specular is zero
Two-thirds of the objects_fragment shader when per-pixel lighting is disabled is in the call to getSpecular.
Usually gl_FrontMaterial.specular is zero, so getSpecular will just return 0. The call to getSpecular should be disabled in that case (except if a specular map is used).
The terrain shader is also affected.
From a quick grep through the source, it looks like material specular isn't even used. If that is the case, the getSpecular
call could simply be moved inside the #if @specularMap
.