1D Texture Interpolation
← 1D Textures | ● | Bilinear Interpolation →
For the case of a nearest-neighbour interpolation (GL_NEAREST) the closest color value of the table for the index $t$ is:
For the case of a linear interpolation (GL_LINEAR) we require the left- and right-hand color values for the index $t$:
The interpolated color value is computed by linear interpolation of the above two color values with the interpolation weight $w$ with
so that
This interpolation scheme is done automatically by the graphics hardware requiring about 6 flops (per rasterized fragment). The same scheme applies to 2D (bilinear) and 3D textures (trilinear).
← 1D Textures | ● | Bilinear Interpolation →