Blur Effect (Wet in Wet effect) in Paint Application Using OpenGL-ES

后端 未结 2 665
离开以前
离开以前 2020-12-10 23:24

I am developing Paint application using OpenGL-ES for iPhone and i want to implement Gaussian blur effect(Wet in Wet) for painting. Please

相关标签:
2条回答
  • 2020-12-10 23:36

    You should be able to render the same brush stroke many times pixels apart to get the effect you want. If you jitter the renders with a Gaussian distribution you will get a Gaussian blur.

    This would be similar to jitter antialiasing with an accumulation buffer, but instead of using subpixel offsets you would use multi-pixel offsets as big as you want the blur effect. You'd would want to probably render around 16 times to make it look smooth. http://www.opengl.org/resources/code/samples/advanced/advanced97/notes/node63.html

    This is also similar(or really the same thing) as jittering to create motion blur. http://glprogramming.com/red/chapter10.html

    You wouldn't even NEED to use a separate accumulation buffer here, just render each pass with alpha that adds up to solid. One thing to remember, you want to always jitter across the same offsets so that successive frames look the same(i.e. if you are using random offsets then every frame will have slightly different blur effect).

    0 讨论(0)
  • 2020-12-10 23:42

    I am assuming you would want to apply this on an Image. I have no idea how this could be done in OpenGL ES. But you could try using this awesome image processing library. It provides other image effects other than Guassian-Blur...

    Happy Blurring...

    0 讨论(0)
提交回复
热议问题