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.
-surgin



