Original Post
hello there, i've been trying to write my first ray tracer and i have come to the point of texture mapping. i have a sphere to cover with a checkerboard texture and im stuck at one point. i know the intersection point between the ray and the sphere and im trying to calculate u and v, the texture coordinates. im using a frame size of 300x300 and 0,0,0 point is the left-most bottom pixel of the frame. im trying to find out an exact formula for u and v but im desperate, i can't find a working one..can anyone help please? thanks..