PDA

View Full Version : NPOT 3D Textures



CatAtWork
12-07-2004, 12:43 PM
Now that ARB_non_power_of_two is available on the GeForce 6XXX boards, should I feel free to use this combination to store all of my animated textures?

For a small number of small textures, a packed 2D approach works fine, but for things like my high-res flame animations, with 192 frames, 3D textures just seem so much more elegant. (I could pack into a 2D 'matrix,' rather than an array...)

No more texture binds, fewer Begin/Ends, and free interpolation are some of the advantages I see.

Is this combination still wasting texture memory under the hood, though? Performance-wise it's looking so-so. I'm getting a 50 percent drop in performance even with fewer texture switches. It could be because of the bilinear filtering.

EDIT: Switching to GL_NEAREST filtering doesn't get rid of the huge performance dropoff.

There was an NVidia document around the GeForce3 or 4 era that showed relative 1D, 2D, 3D, and RECT texturing costs. I can't seem to find it at the moment.

evanGLizr
12-07-2004, 04:52 PM
Originally posted by CatAtWork:
Now that ARB_non_power_of_two is available on the GeForce 6XXX boards, should I feel free to use this combination to store all of my animated textures?
[...]
Is this combination still wasting texture memory under the hood, though? Performance-wise it's looking so-so. I'm getting a 50 percent drop in performance even with fewer texture switches. It could be because of the bilinear filtering.

EDIT: Switching to GL_NEAREST filtering doesn't get rid of the huge performance dropoff.
Are you showing the texture magnified or minified?
Are you using mipmaps in both cases?
Did you try GL_NEAREST_MIPMAP_NEAREST?

CatAtWork
12-08-2004, 06:23 AM
I'm showing them both magnfied and minified.
I'm using mipmaps in both cases.
Yes, I tried GL_NEAREST_MIPMAP_NEAREST.

endash
12-09-2004, 12:39 PM
I'm pretty sure 3D textures are generally slower, so a 50% slowdown doesn't blow my mind. The fact that turning off interpolation didn't change things is interesting; I would have thought that a lot of that was doing trilinear interpolation, though. Apparently not.