Fixes for glsl 1.2. I swear it worked on OpenGL 4