There seem to be a number of problems with the current shaders and Mac OS X's OpenGL drivers. I know that's why they are disabled in the current build and I thought I should investigate a little...
shaders with shadows: no gloss map, frame rate at 16fps.
shaders without shadows: gloss map okay, frame rate at 115fps.
Number one is that shadowing and brake lights are not being correctly applied. Indeed the brake light texture seems to be being applied to the landscape, as well as being permanently 'ON' on the car. With the shadows ON the gloss map is also FU.
The second (IMO) more serious problem is that the glsl code is causing OpenGL to fall back to software rendering of the shader effects. This simply should not be happening,as the shaders in themselves are not at all complex. The 'full' fragment.glsl is definitely the culprit in this case.
I've played with this shader a bit and unwinding the loop, restriking the arrays as pairs of variables and moving variable declarations to the head of the block improve the framerate up to around 25-30fps, but something in there is still causing a major graphics pipeline problem.
Remedies:
1. clean up the code.
shaders/full/fragment.glsl is currently stuffed with comment cruft and should be cleaned and have more helpful comments added.
Arrays should be avoided and loops unrolled if possible.
2. look to the uniform variables - the brake light texture is being applied to the landscape - that shouldn't happen at all. The texture should be cleared or a different shader used for the car as distinct from the landscape.
Disclaimer:
My knowledge of shaders is based on the minimal work I did introducing them in Oolite, and reading around the problems of software fallback on the Apple lists. If I'm treading on anyone's toes in criticising their coding style, please don't take it personally. My code is also crap - often.
-- Giles.