I am not sure how exactly the texture2D command works in GLSL with linear filtering. How does it choose and linearly interpolate between pixels.
Imagine I had a texture with 4 grayscale pixels of value {0, 1, 2, 3}. And I wanted OpenGL to draw it across a line, 8 pixels wide. How would texture2D fill those 8 pixels?
Would it be something like: {0, .375(3/8), .75(6/8), 1.125(9/8), 1.5(12/8), 1.875(15/8), 2.25(18/8), 2.625(21/8), 3}?