Implementation of GLSL median filter (GLSL 1.20)