workaround for division by zero on fog calculation
first try of osx fix, mostly by pauldachz
build fix
also check for glsl errors on linking, activation GLSL_DEBUG again (slowdown on shader compilation)
always write to uv coords