You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 5: Texture Mapping (70)
CCP115

My understanding of what linear interpolation is trying to do is a bit blurry. For the 1D example we have two points, and x represents the relative distance of some point inbetween the two, so we use linear interpolation to find that point inbetween. I follow so far.

What I don't follow is for the 2D example, we calculate s and t ourselves. To do this, we need to have the red point in the first place. What exactly are we trying to calculate at this red point?

adityasingh7311

I don't fully understand either but my understanding so far is that we have a point on our screen that we want to map to a texture. Using barycentric coordinates we would find the red point.

But the red point does not exactly correspond to a point on the texture map. We could use nearest neighbor and choose the closest point of the texture map but this causes many artifacts so an alternative is to use bilinear interpolation.

My guess, which would be great if somebody could confirm, is that bilinear interpolation provides a weighted average of rgb values using the 4 texel points closest to the given red point. Then this average is what is used in the screen pixel.

You must be enrolled in the course to comment