PDA

View Full Version : How to pack floats in a float texture.



TAX
01-22-2004, 12:20 AM
I am trying to pack floats into a single float (½ precision), so I can store them both in a float texture.

I have read that this is possible in the NV_float_buffer extension. The question is just how do I do that from a Cg fragment program?

I cant seem to find it described in the Cg Tutorial book.

I guess I am looking for a function like:

float pack2floats@½precision(lower, upper);
float unpack2floats@½precision([lower | upper]);

But thats just a wish.
http://www.opengl.org/discussion_boards/ubb/smile.gif

Zengar
01-22-2004, 07:19 AM
Look for fp30 profile functions. It was there.