I've read the documentation on glTeximage2D and am a bit confused in which case OpenGL clamps the texture values to [0,1] or not. I'm using GL_RED as format in my texture and the documentation says:
format determines the composition of each element in data. It can assume one of these symbolic values:
GL_RED Each element is a single red component. The GL converts it to floating point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for alpha. Each component is clamped to the range [0,1].
Doesn't this basically say that OpenGL always clamps the values regardless of the internal format?
However when I upload my texture as:
glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, width, height, 0, GL_RED, GL_FLOAT, data);
OpenGL does not clamp my data with GL_R16F as internal format. But if I change the internal format to GL_R16 they do get clamped. Where does the documentation say anything about clamping based on the internal format?