For the triangle vertices in texture space, do we just map from triangle to texture space by Barycentric coordinates? Are we just supposed to take the averages of three vertices at each point which represent the current point on the triangle
Staffyirenng
@rishiarjun
It works like this:
We send a triangle to the screen to be rasterized. Each vertex has screen-space (x,y) coordinates for where it should appear on screen, and (u,v) texture coordinates for the location it should sample from in the texture image.
During rasterization, a sample is generated for each framebuffer pixel inside the triangle. For each sample, which has screen-space (x,y) coordinates, barycentric interpolation is applied to calculate interpolated (u,v) coordinates at that sample location.
Each of these interpolated (u,v) coordinates is used to index into texture space (potentially with texture filtering as described later), to retrieve the texture value to apply at the sample associated with the framebuffer pixel.
For the triangle vertices in texture space, do we just map from triangle to texture space by Barycentric coordinates? Are we just supposed to take the averages of three vertices at each point which represent the current point on the triangle
@rishiarjun
It works like this:
Does this answer your question?