GLSL shaders to calculate err_im