PDA

View Full Version : Texture sizes - does size matter?



surgptr
11-22-2003, 10:05 AM
Is there any advantage in using texture sizes that are in powers of two?
Are video cards optimized for texture sizes like 256x256, 512x512, 1024x1024, etc?

Is there any reason why I would not want to use custom texture sizes like 800x800?

Thanks
Paul

chowe6685
11-22-2003, 12:58 PM
well most cards won't accept non power of two textures without extensions or resizing, so for most cases you must use them. The reason for the restriction is that power of two textures are much faster due to video card architecture

Rog
11-22-2003, 02:00 PM
FWIW, you don't need to always have 256x256, 512x512 etc. you can also have 256x512, 128x256 and so on.

One of the reasons (as I understand it) is that it makes it easier to produced mipmaps with power-of-two texture dimensions. I'd be interested to hear the other reasons?


[This message has been edited by Rog (edited 11-22-2003).]

DJSnow
11-23-2003, 06:30 AM
@previous poster:

no, the mipmaps are not the main reason; videocards GPU's and CPU's are able to handel data in such dimensions faster, this is a reason of hardware-design.

mipmapping is another one, but you would be able to do mipmaps of nonpow2-textures as you would do it with pow2-textures, so there is no advantage.

Obli
11-24-2003, 05:21 AM
Originally posted by DJSnow:
mipmapping is another one, but you would be able to do mipmaps of nonpow2-textures as you would do it with pow2-textures, so there is no advantage.
Not sure of that since ARB_npot specifies a different way to compute mipmap sizes on npotd textures. Now, for standard textures it would be fine to have the driver kick in and do its dirty job but put in a dynamic texture and this starts to sound like a performance problem to me.
Also, consider someone may just want to hardwire a 2x2 average box to do mipmapping (fast and cheap) - put in a 801x799 texture and you'll have a texel too much.

I don't think this is not an issue.

Also look at NV_rect. If mipmaps would have been obvious they would have supported them.