firegun9
05-23-2007, 12:21 PM
Hello,
I am trying to make some Gaussian blur effect. Here is the result. I use 13x13 horizontal and vertical separately blurs.
http://joe.phsiao.googlepages.com/combine.png
The problem is the edges of the blurred object are jagged. I can see the squares in different colors along the edges. I need smooth edges.
Here is how I make the blur effect.
1. Downsample and pass the objects need to be blurred from the original 512x512 texture to a 128x128 image and do a horizontal blur.
2. Copy the result image to another 128x128 image and do a vertical blur.
3. Copy the result image to the first 128x128 image and do a horizontal blur.
4. Copy the result image to the second 128x128 image and do a finally vertical blur.
The 4-times blurred image is here.
http://joe.phsiao.googlepages.com/blur.png
Maybe I could get a better result by using a two-dimensional kernel rather then separate horizontal and vertical kernels. But that would be much less efficient. Any suggestions?
I am trying to make some Gaussian blur effect. Here is the result. I use 13x13 horizontal and vertical separately blurs.
http://joe.phsiao.googlepages.com/combine.png
The problem is the edges of the blurred object are jagged. I can see the squares in different colors along the edges. I need smooth edges.
Here is how I make the blur effect.
1. Downsample and pass the objects need to be blurred from the original 512x512 texture to a 128x128 image and do a horizontal blur.
2. Copy the result image to another 128x128 image and do a vertical blur.
3. Copy the result image to the first 128x128 image and do a horizontal blur.
4. Copy the result image to the second 128x128 image and do a finally vertical blur.
The 4-times blurred image is here.
http://joe.phsiao.googlepages.com/blur.png
Maybe I could get a better result by using a two-dimensional kernel rather then separate horizontal and vertical kernels. But that would be much less efficient. Any suggestions?