Power2 textures?

Started by
4 comments, last by darookie 18 years, 9 months ago
My graphics card supports NonPower2 textures. My questions is, for textures which must be power2 textures, must they be squares? LxL where L is of power2? or can they be rectangles? AxB where A and B are of power2, but A is not necessarly equal to B. Thanks in advance.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Advertisement
Textures can be non-square even on cards that don't support non-power-of-two textures.
The driver, however, limits the maximum ratio of the texture dimensions to a certain amount (e.g. 1:8 or 1:4). In general, 128x512 or 256x64 textures are perfectly valid on modern cards.

HTH,
Pat
Quote:Original post by darookie
The driver, however, limits the maximum ratio of the texture dimensions to a certain amount (e.g. 1:8 or 1:4). In general, 128x512 or 256x64 textures are perfectly valid on modern cards.

HTH,
Pat

Got anything to back that up? I can quite happily use 512x1 textures here.

Very old (eg. Voodoo 2) cards had this limitation, but I don't think you'll find any cards still in use with this problem.
As already stressed, square textures are very rarely (if at all) an issue on any hardware you're likely to come across. Although, some square sizes will fit into hardware cache's better such that it can be beneficial (performance wise) to use them if you can [smile]

Check out the D3DPTEXTURECAPS_SQUAREONLY capability bit in the TextureCaps field of a D3DCAPS9 structure.

Quote:The driver, however, limits the maximum ratio of the texture dimensions to a certain amount (e.g. 1:8 or 1:4).

This is new to me as well - are you sure of that? I know that Direct3D will only allow a certain number of repetitions of texture coordinates that is effectively specified as a ratio (forget the exact mathematics of it though)...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by jollyjeffers
Quote:The driver, however, limits the maximum ratio of the texture dimensions to a certain amount (e.g. 1:8 or 1:4).

This is new to me as well - are you sure of that?

Just found D3DCAPS9::MaxTextureAspectRatio... which on my system is set to 2048, as is the maximum texture dimension... thus I suppose the aspect ratio does exist, it's just pretty irrelevent on my setup. Interesting [smile]

Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by OrangyTang
Quote:Original post by darookie
The driver, however, limits the maximum ratio of the texture dimensions to a certain amount (e.g. 1:8 or 1:4). In general, 128x512 or 256x64 textures are perfectly valid on modern cards.

HTH,
Pat

Got anything to back that up? I can quite happily use 512x1 textures here.

Very old (eg. Voodoo 2) cards had this limitation, but I don't think you'll find any cards still in use with this problem.

Yes, I do.
It's in the D3D caps. DX8 level cards might have max ratios that equal their max. texture size, e.g. max. texture size is 2048x2048 and max texture ratio is 2048.
I such case it is, of course, no problem to create large 1D textures, etc.
Check the D3DCAPS8 for example. They contain a field called MaxTextureAspectRatio (identical to max texture size for recent cards, indeed).
Please don't expect me to know these caps for each and every card model or -generation that is out there (not to mention the different driver versions).
I was just pointing out a possible limitation to be aware of.

Regards,
Pat.

This topic is closed to new replies.

Advertisement