Jump to content
  • Advertisement
Sign in to follow this  
The C modest god

Power2 textures?

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!