produces correct image.

kernalMax implemented using shared memory, but slightly slower.