title: Using MPSImageConvolution kernel with Metal compute shaders
body: <p>I am using the MetalVideoCapture example located here <a href="https://github.com/FlexMonkey/MetalVideoCapture" rel="nofollow">https://github.com/FlexMonkey/MetalVideoCapture</a>. The only thing I altered in my version was using MPSImageConvolution (instead of MPSImageGaussianBlur) with kernel values:</p>
  
  <pre><code>[-2.0, -1.0, 0.0,
   -1.0,  1.0, 1.0, 
    0.0,  1.0, 2.0]
  </code></pre>
  
  <p>Using the values above failed to alter the output in any visible way. But an edge enhance kernel e.g</p>
  
  <pre><code>[0.0, -1.0, 0.0, 
   0.0,  1.0, 0.0, 
   0.0,  0.0, 0.0]
  </code></pre>
  
  <p>works, mind you in column-major order only; it does not work in row-major order even though thats what MPSImageConvolution expects. I'm really stumped by this. I do not know if there is an obvious reason that a convolution kernel cannot work in a compute pipeline (only in a render pipeline) but i couldn't find any info on this online.</p>
  
  <p>I also modified the codebase to apply the kernel to a static image instead of a live video feed; This yielded the same results, however.</p>
  
  <p>I also wanted to point out that I posted the same question on the example project's message board (<a href="https://github.com/FlexMonkey/MetalVideoCapture/issues/1#issuecomment-217609500" rel="nofollow">https://github.com/FlexMonkey/MetalVideoCapture/issues/1#issuecomment-217609500</a>). The author of the example was equally as stumped as I was, which lead me to believe it was some sort of bug or a gap in my conceptual knowledge of why this is not even suppose to work.</p>