I have differents grayscale textures of a height of one pixel, with GL_LINEAR interpolation.
Texture T(k) is made of a gradient from left to right of k pixels from 0 (black) to 255 (white).
Examples :
T(2) = 0 255
T(3) = 0 128 255
T(4) = 0 85 170 255
T(256) = 0 1 2 ... 255
Some examples rendered are there :
Why textures do have different results ? The gradient appears more nicely arranged when more pixels are used.
In practice, I can't use less pixel to render a nice gradient to save memory if I want the same result. I suppose the "right" gradient is the one with the most pixels, T(256).



