Floating point textures, negative numbers and value range

I’m trying to do GPGPU on Linux/NVidia/Cg using single channel floating point textures. I can initialize the texture just fine using glTexImage2D and then use a Cg fragment program to compute. However when I use glReadPixels the results are clamped to [0,1]. Is there a way to read negative and unclamped values from the framebuffer? If I use glCopySubImage2D will I get the unclamped values in the destination texture?

Most likely I could rescale these values by subtracting 0.5 and rescaling to some value range but this seems like a lot of extra computation.

Is there anyway around this, without using pbuffers or framebuffer objects?


Head over to this thread where things are explained pretty nicely.
Nighty night

thanks JCD. unfortunately i don’t have the glClampColorARB function extension available but i managed to get around the problem by keeping a packed format. can’t wait until fbo in linux!