jcabeleira
03-12-2010, 09:16 PM
Hello, I need to implement a geometry aware gaussian blur filter that blurs along the surfaces (like walls). To do that I need to get the per-pixel vectors that represent the surfaces variation/gradient in screen-space like in this image:
http://www.voltaico-engine.net/files/gradients.jpg
Unfortunately I don't know how to get these vectors. I supose it can be done by using the dFdx and dFdy GLSL functions to find the per-pixel variation of something but I'm really confused about the details. I'd really appreciate any help.
Thanks in advance.
---Joćo Cabeleira
http://www.voltaico-engine.net/files/gradients.jpg
Unfortunately I don't know how to get these vectors. I supose it can be done by using the dFdx and dFdy GLSL functions to find the per-pixel variation of something but I'm really confused about the details. I'd really appreciate any help.
Thanks in advance.
---Joćo Cabeleira