Altering texture coordinates in a cg shader

Sorry for cross-posting, but probably this was the right forum …

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

You could store a sin-wave normal map in a texture an offset your interpolated texcoord by a texture lookup. If you want an animation you could store several normal maps in a 3D texture.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.