View Full Version : Altering texture coordinates in a cg shader

05-21-2004, 01:37 PM
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

05-22-2004, 01:47 AM
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.