Sunday, March 2, 2008

Attempt at Texture Mapping on a Sphere

There is something weird going on around the poles; I may be calculating rho incorrectly by somewhere taking an absolute value or something. I should index different parts of the image if I am close to 0 or if I am close to Pi.

The red around the border is intentional - I was concerned with accessing elements of my image in a non sequential way, I thought this was the source of my problem. However, the non sequential accesses are as they should be, right around the edges of the sphere where I wrap around to the other side to get my texture.


Here is a big sphere with my texture mapped to it - no shading



Here's the texture - generated in Gimp

No comments: