Sign in to follow this  

mipmap dimensions

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

Do mipmap dimensions still need to be powers of 2 (or was that just in old times?) I loaded an image (not of power of 2 dimensions) using D3DX10CreateShaderResourceViewFromFile and it worked, but I am wondering if the function resized it to powers of 2 internally.

Share this post


Link to post
Share on other sites
Mipmaps never needed to be pow2 unless the top level surface was pow2.

width' = max(width/2,1);
height' = max(height/2,1);

You can pass a width and height of 'D3DX_DEFAULT_NONPOW2' to D3DXCreateTextureFrom*Ex to make a non-pow2 texture. This will work on nearly every card that works in DX9, but there will be limitations on many cards (see the caps entry on nonpow2conditional). If you just pass D3DX_DEFAULT, it will make a pow2 texture. If you pass D3DX_FILTER_NONE as the filter to the create call, the texture won't be stretched, it just won't fill the entire surface. Each of the 3 cases has valid uses.

Share this post


Link to post
Share on other sites

This topic is 3679 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this