Giving up on pure GLSL implementation, started working on OpenCL.