1
General coding questions / Re: How do I apply blur filters in OpenGL?
« on: March 31, 2014 »
2 shaders are used as an optimization. You can do it with one shader pass, but if each pixel looks up a surrounding 5x5 pixel box then you have to do 25 lookups.
If you do horizontal 5 pixels in one pass and then vertical 5 pixels on the result od the horizontal pass, you have only done 10 lookups per pixel (instead of 25) for the same(similar?) result.
The numbers he uses are "weights based on how far the lookup is from the centre pixel (current pixel).
See here: http://www.aishack.in/2010/08/image-convolution-examples/
If you do horizontal 5 pixels in one pass and then vertical 5 pixels on the result od the horizontal pass, you have only done 10 lookups per pixel (instead of 25) for the same(similar?) result.
The numbers he uses are "weights based on how far the lookup is from the centre pixel (current pixel).
See here: http://www.aishack.in/2010/08/image-convolution-examples/

(Do I win a prize or something guys?)