Jump flood algoritm works.