Jump to content
  • Advertisement
Sign in to follow this  
Malder1

Can I create and use non-square textures? 64x256

This topic is 4266 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

Is it good to create and use non-square textures? For example, 64 x 256 Does video card really get memory for exactly size of this texture? In other words are there known issues with such textures?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
it gives you, well, nothing.

when using those textures (e.g. 64x256), the driver will map them onto a 256x256 texture.
and it will recalculate the texture positions for you. so this will be nothing but slower.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
it gives you, well, nothing.

when using those textures (e.g. 64x256), the driver will map them onto a 256x256 texture.
and it will recalculate the texture positions for you. so this will be nothing but slower.


This may be true in the “dark ages” of 3D rendering. Today nearly every graphics chip support non-squared textures without such tricks.

There is a caps flag D3DPTEXTURECAPS_SQUAREONLY that you can query to check if your adapter supports non-squared textures.

Share this post


Link to post
Share on other sites
As Demirug says, practically every card you'll find supports non-square textures natively, you can look in the card caps spreadsheet in the SDK to see which specify D3DPTEXTURECAPS_SQUAREONLY. IIRC it was only the 3Dfx Voodoo1 & Voodoo2 (and variants) which had the requirement for square textures.

Some video card drivers may add extra padding and/or alignment of course, so your 64 pixel wide texture may really be, say, 80 pixels wide in memory so you still should never rely on a 64x256 texture taking an exact amount of video memory. See the "Width vs Pitch" topic in the SDK documentation for more details.

Share this post


Link to post
Share on other sites
One final issue is that some mipmap generating tools (nVidia's old photoshop plugin for example... not sure about their latest) get confused on the fast few mips and just set them to black. (ie: 4x1 is fine, 2x1 is black, 1x1 is black)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!