PDA

View Full Version : How to fill a texture with numerical data



Dylan
09-30-2006, 06:01 AM
instead of using an texture as an an image to map on a polygon, i want to use a texture as a data structire to carry a lot of data, and process this data in the fragment processor. How can i make my own texture filled with data?

Zengar
09-30-2006, 07:31 AM
Use floating-point textures. You will be still bound to opengl texture formats, there is no way around - meaning that you can store maximal 4 32-bit elements in your texture (or 8 16-bit/16 8-bit by using packing).