Have you ever seen black borders in the resulting images of your compute shaders? Here is the solution!
The following image demonstrates what the problem is. Black pixels at the borders of images created oder altered with a compute shader.
The problem is caused by the division of two integer type numbers. Usually the compute shaders are dispatched by using the dimensions of the image divided by the local_size values of the compute shader (example below).