I am using an OpenGL SL kernel to perform operations on a texture in an Xcode project under OS X. To allow for anisotropic filtering (that is, smoothing without edge loss), I need to access the neighbouring pixels to construct a gradient map.
How does one access neighbouring pixels (above, below, left, and right) in a texture to compare their values with the pixel of interest?
Thanks in advance for any help that may be offered.
I used this while playing with post-processing effects. I rendered the scene on a 512x512 texture and map it on a quad in a 512x512 window.
It worked the way i wanted.
I used this while playing with post-processing effects. I rendered the scene on a 512x512 texture and map it on a quad in a 512x512 window.
It worked the way i wanted.
I hope this can help you.
FenKz[/b]
I know this should work and is the common way, but my offset needed to be up to 400 or so sometimes if i wanted to see an effct. Could this be because i used mipmapping?