The Sobel operator shader is also available in the shader library of Gamestudio! Just have a look...