What is the general algorithm of the texture mapping ?
I have searched the google, but I have not seen any pseudocode algorithm of the texture mapping. Can you give it, by showing step by step ?
What is the general algorithm of the texture mapping ?
I have searched the google, but I have not seen any pseudocode algorithm of the texture mapping. Can you give it, by showing step by step ?
The general idea of texture mapping is:
How the texture function and the coordinate mapping is implemented depends on the actual needs and can be very different. If your texture is defined by a bitmap then you will need bilinear or becubic filtering to interpolate for non integer values of u or v. There are also different possibilities to map points (x,y,z) on the surface of a 3D object to texture coordinates (u,v).