Altering texture coordinates in a shader

I’m trying to figure out a way to alter texture coordinates so that they follow, for example, a sin wave or some sort of functions. This has to be done in a cg shader, in a cg pixel shader to be more precise, but so far i just managed to manipulate the output color. There is a way to manipulate tex coords as well ? Thanks

Yep… You can calculate or change texcoords in pixel/fragment shader. Do google for parallax bump mapping for example.