glTexImage2D
takes internalFormat
(which specifies number of bits and data type/encoding), format
(without number of bits and encoding) and type
.
Is it possible, for example, to let OpenGL convert passed pixel data containing 32 bit integers from format GL_RGB_INTEGER
and type GL_INT
to internal format GL_RGB32F
?
The wiki article https://www.khronos.org/opengl/wiki/Pixel_Transfer#Format_conversion suggests to me it's possible by stating:
Pixels specified by the user must be converted between the user-specified format (with format and type) and the internal representation controlled by the image format of the image.
But I wasn't able to read from floating point sampler in shader.