How correct is my Gaussian Blur GLSL code?

I read two things about implementing a two-pass Gaussian Blur with a controllable filter size and bi-linear sampling.

rastergrid.com/blog/2010/09/effi … -sampling/
and the source code of ofxBlur [url]https://github.com/kylemcdonald/ofxBlur/blob/master/src/ofxBlur.cpp[/url]

My tox works pretty well. It’s not as fast as the Blur TOP, and the amounts of blurs don’t match either. What should I do to make them match perfectly?

I think one important factor is my choice of standard deviation for the Gaussian function. The weights at the extremes of the kernel are supposed to approach zero (like the Gaussian curve), but if they’re so close to zero, why even calculate them? This is why people can subjectively decide how many standard deviations into the Gaussian function that final lookup should be. I chose 3. I think ofxBlur chose sqrt(5). sqrt(5) is 1. / sqrt(0.2) and look for 0.2 in the ofxBlur code. I’m also not sure my python code is correct for odd-numbered filtered sizes. Anyway, check it out it because it may be useful even if it’s not the same as the Blur TOP.
gaussian_blur.tox (2.8 KB)