PDA

View Full Version : 3D texture performance



wizzo
12-12-2003, 08:42 AM
hi all

i wanted to know if 3D texture where really slower than others...
i'm doing my some dynamic lightmapping, and i wondered if mapping a single 3D texture wasn't faster than mapping a 1D and a 2D texture...

wizzo

azazello
12-12-2003, 10:07 AM
I had something like 98-99% on NV34/Det50 of 2D texture performance(probably, it is specific to my card)

Korval
12-12-2003, 12:37 PM
I wouldn't be terribly surprised if 3D textures weren't as fast as others on modern hardware. However, and this is important, the 3D equivalent of your 2D/1D lookup is much bigger than a 2D and 1D texture. As such, it's a memory vs. performance tradeoff.

SirKnight
12-12-2003, 02:14 PM
As such, it's a memory vs. performance tradeoff.


What tradeoff? If 3D textures are not only slower than using a 2D and 1D AND take up more memory, then there is no tradeoff here. It's just plain bad all the way around.


-SirKnight

Korval
12-12-2003, 03:30 PM
If 3D textures are not only slower than using a 2D and 1D AND take up more memory, then there is no tradeoff here. It's just plain bad all the way around.

Unless, of course, 1 3D texture access is faster than 1 2D and 1 1D texture access. Which "ayaromenok" reports is true for his NV34.

Klaus
12-12-2003, 03:31 PM
If you don't need trilinear interpolation don't use 3D textures. They are definately slower. Due to 8 neighbor memory fetches (instead of 4 for bilinear) this should be no wonder for anybody.

If you need to access a 3D array but only require bilinear interpolation, flatten the 3D array, i.e. use a big tiled 2D texture with sub-texture coordinates.

Klaus

[This message has been edited by Klaus (edited 12-12-2003).]

Zeno
12-12-2003, 09:45 PM
How do you get 8 neighbors, Klaus? Wouldn't there be 6?

wizzo
12-12-2003, 10:30 PM
well I did my dynamic lightmapping with 3D texture and compared, and it looks like i've got approximatly the same frame rate than 1D/2D
though, as you said, Korval, there is the huge increase of used memory...

Well now my program support the two ways to do it, so i guess that will be the user's choice =)

for information, what is your card ayaromenok ?

thanks all for your answers
wizzo

Leyder Dylan
12-14-2003, 11:30 AM
wizzo,

Remember that the 3D texture is used with an hardware extension so perhaps, that the fps will be the same.

For a 2D texture : 64*64 = 4ko
For a 3D textyre : 64*64*64 = 256ko

[This message has been edited by Leyder Dylan (edited 12-14-2003).]