I implemented a Gaussian flash shader in GLSL. I understand the basic concepts that underlie all of this: convolution, separating x and y using linearity, multiple passes to increase the radius ...
I still have a few questions:
What is the relationship between sigma and radius?
I read that sigma is equivalent to radius, I donβt see how sigma is expressed in pixels. Or is this "radius" just a name for sigma not related to pixels?
How to choose a sigma?
Given that I use several passes to increase sigma, how to choose a good sigma to get the sigma that I want to get with any pass? If the resulting sigma is equal to the square root of the sum of the squares of the sigma, and the sigma is equivalent to the radius, then what is a simple way to get any desired radius?
What is a good size for the kernel and how does it relate to sigma?
I have seen that most implementations use the 5x5 core. This is probably a good choice for quick implementation with decent quality, but is there any other reason to choose a different kernel size? How does sigma relate to kernel size? Should I find the best sigma so that the coefficients outside my core are insignificant and just normalize?
image-processing gaussian shader glsl fragment-shader
Loderunner
source share