I just stumbled upon GL_MIRRORED_REPEAT as value for texture wrapping.
I’ve never used it, but it kinda sounds like it could be what you need. From the description I make up the following:
The fractional part of the coordinate if the integer part is even (so 0.1/2.1/4.1 becomes 0.1) and 1 minus the fractional part of the coordinate if the integer part is odd (so 1.1/3.1/5.1 becomes 1 - 0.1 = 0.9).
Let me know if this is what you’re looking for.
Perhaps if this is not working for you, it might be working if you change your lookup texture and the texture coordinates as well. If you would use GL_MIRRORED_REPEAT in combination with half the lookup texture you have (scale the 0.0 - 0.5 part over 0.0 - 1.0), what would happen than? Say: your lookup texture is:
texture coordinates 0 1
colour values 0.0 1.0 (say ranging from red to white)
Now texturing gives the following:
texture coordinates: 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4, ...
colour values: 0.0 0.2 0.4 0.6 0.8 1.0 0.8 0.6, ...
With such a scheme, your new tex coordinates must be (just multiply them by 2):
1.0
/ \
/ \
/ \
/ \
0.2 ----- 1.8
When doing a lookup with GL_MIRRORED_REPEAT this becomes:
1.0 (which is now white in your lookup texture)
/ \
/ \
/ \
/ \
0.2 ----- 0.2 (which is red in your lookup texture)
Which I believe is what you would like.
edit: thinking somewhat more about this, it probably won’t work eiter, because in the middle of the bottom part the texture coordinate is 1.0 (between 0.2 and 1.8) which becomes just 1.0 (and thus you will still have the undesired effect).