send texture to shader program


I have a texture of 8by8 uByte data, which contains values I would like to access my shader, for example feature coordinates. While shading my polygon I need to access this data. But I do not want it be altered, like being interpolated to fit the size of the polygon.
My shader is at pixel i,j and looks up in the texture to do some ops with the sixteen values inside the texture. Can I assume in some way that the values are not going to be modified? Are their any parameters in the opengl API to tell the opengl machine not to modify the texture?

thx a lot

You mean the 64 GLubyte values…

I think you are better off posting to the shading
language forum.

I see no reason why the texture data would be altered
by the shader program. Unless I am missing somthing.

He may be referring to the artefacts introduced in texture filtering/mipmapping.

The shader won’t touch your texture data, it only reads from it.

If you don’t want the texture data to be interpolated over the entire polygon, try setting your texturing to GL_REPEAT rather than GL_CLAMP (I don’t know which one OpenGL defaults to).