Common GLSL functions