Original Post
I've recently been trying my hand at some basic texturing of my terrains. My initial approach for now is to just stretch a texture of equal dimensions as my terrain over it. I'm using a generic grass texture and a simple little formula for determining the appropriate uv coords. The formula is: u = (1 / width) * x v = (1 / height) * y And that forumla gets applied to the Tu and Tv properties of the vertices as I iterate through the terrain data. Problem is, when I run the program, all I get is a solid vomit green color over the whole terrain, not the nice grass texture I expected. I already verified the formula works, too. Say for instance the texture and terrain are both 256 x 256. (1 / 256) * 256 = 1 (1 / 256) * 128 = .5 (1 / 256) * 64 = .25 .... (1 / 256) * 0 = 0 Which are all correct values, so I was wondering if anyone had any suggesstions or ideas as to what might be going on. Thanks. -AJ