Ported to GLSL 1.2