Hi,

My issue is the following:
I have an image that contains grey-values of more than 8 bits (so 10,12,16 bits) that I want to save into a texture on iOS (OpenGL ES 2.0) and use a shader to map the contained values into the range of 0...255.
The shader is no issue at all but the saving of the array into the texture using this command
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, (int)pixelSizeToUseForTexture.width, (int)pixelSizeToUseForTexture.height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, imageData);
seems to cap all values above 255 by design.

If/how can I maintain the full range of the values in the texture?
What I currently do is to go through the complete array and map all values manually into 0...255 and then write the result into the texture (I know this is odd and does not leverage the shader's capabilities).

Could somebody point into an appropriate direction?

Thanks in advance.

Lars