View Full Version : floating point texture storage requirements

Mark Shaxted
09-27-2007, 01:48 AM
I believe 8/16 bit RGB images are aligned on 32/64 bit boundries (ie you get an alpha if you want one or not).

Does the same apply to floating point (RGB) textures? Do these occupy 96 or 128 bits of vidmem?


09-27-2007, 08:35 AM
I don't think you will ever find out... It will most probably depend on the card. But I guess that the alignment is 32-bit for Nvidia hardware (and probably for ATi too).

09-27-2007, 04:00 PM
128, almost certainly. GPUs supporting true 3-channel textures are mythical beasts.

Mark Shaxted
09-28-2007, 03:47 AM
Thanks chaps... I also found this.


I didn't really expect 96 bits, but it would have been nice!

09-28-2007, 10:11 AM
The vector hardware in the GPU (as well as the CPU if you do any real work there) is based around 4 components. Converting from a 3-component memory format to a 4-component register format is just too much work - it's easier and faster to just leave a dummy channel.

The reason there is native support for 1- and 2-channel textures is that they can be packed into a 4-channel texture, that is

{r}{g}{b}{a} // RGBA
{r}{r}{r}{r} // R
{l}{a}{l}{a} // LA
{r}{g}{b}{*} // RGB