Oh - and incidentally, using unnecessary "if" statements inside shaders is a really bad idea - especially on older hardware. Shaders are NOT general purpose CPU's and you can't treat GLSL like it was C or C++.
On some older machines, both the 'then' and the 'else' part consume time, even if they aren't being executed!!! eg:
if ( a )
do_something () ;
do_something_else () ;
...executes at a speed that is equal to the time it would take to do BOTH "do_something" AND "do_something_else". Even modern machines will suffer this problem in pixel shaders under some rather common situations!!
Hence, even when you have lighting and shadowing turned off - you're still paying the price for doing both. With your deeply-nested "if" statements, you're running every statement in the shader even if just one assignment was all that was needed!
Since it looks like you're using uniform variables to switch various modes on and off - you'd be better to create different shaders for each combination of modes using #if/#else/#endif to keep your sanity! When you're rendering, consider sorting your objects according to the shader they need in order to minimize shader reloading.