16-bit float readback problem

It could be related to pixel packing/unpacking.
Try using
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_PACK_ALIGNMENT, 1);

If that doesn’t work, maybe you can post a screenshot of the problem?

Well to be more clear with a GL_RGBA16F_ARB I simply take widthheightsizeof(float)*4 sized memory and fill it with value of 250. When I simply display this I should get a white screen right? But I get a green screen instead.

When I switch to GL_RGBA32F_ARB there is no problem, the screen is white.

Actually if someone can only post a simple program where the texture (texture is again 16bit floating point RGBA) data is created in the main memory and then sent to GPU and then displayed using the fragment program that would be enough. I.e.

  • Create Texture
  • Create Dynamic memory using the specified width and height
  • Fill dynamic memory so that the final result will be a red screen
  • Send texture to graphics card
  • Run cg program (dont really need this)

CG program for displaying:
void main( float2 rayTexIdx : WPOS,
out float4 col : COLOR,
uniform samplerRECT textureSource )
{
col = texRECT(textureSource, rayTexIdx);
}

Thanks