I just have a question/remark on GLSL specifications about float texture and sampler. (Just consider the case of GL 3.x and GLSL 1.3 or higher).
In the GLSL specification :
“Texture data can be stored by the GL as floating point, unsigned normalized integer, unsigned integer or
signed integer data. This is determined by the type of the internal format of the texture. Texture lookups
on unsigned normalized integer and floating point data return floating point values in the range [0, 1].”
“If an integer sampler type is used, the result of a texture lookup is an ivec4. If an unsigned integer sampler
type is used, the result of a texture lookup is a uvec4. If a floating point sampler type is used, the result of
a texture lookup is a vec4, where each component is in the range [0, 1].”
GLSL 1.5 Specifications p.97
But I believed that GL and GLSL support natively float textures and thus float values in [-oo, +oo].
According to the GL’s Wiki :
[b]Are Values Clamped from 0.0 to 1.0 ?
No, you can use the full range supported. GL_RGBA32F_ARB, GL_RGB32F_ARB, GL_ALPHA32F_ARB, GL_INTENSITY32F_ARB, GL_LUMINANCE32F_ARB, GL_LUMINANCE_ALPHA32F_ARB for 32 bit floats.
GL_RGBA16F_ARB, GL_RGB16F_ARB, GL_ALPHA16F_ARB, GL_INTENSITY16F_ARB, GL_LUMINANCE16F_ARB, GL_LUMINANCE_ALPHA16F_ARB for 16 bit floats.
For GL 3.0, you can drop the _ARB postfix since float textures are a requirement.[/b]
Who is right ?