Sign in to follow this  

How do I know which MIP level to use?

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

This sounds like a silly question, but I havn't the slightest clue which MIP level to use at what view distance. I'm drawing my terrain with 0.2f x 0.2f quads, each using up an entire 512x512 texture (at the moment). So, which MIP level do I use at what view distance? Is there some formula or something?

Share this post


Link to post
Share on other sites
Yes there is a formula based upon the scale factor between the texture image and the size of the polygon to be textured. It is described in full on page 386 in the OpenGL Programming Guide (3rd edition, OpenGL v1.2) - It'll be in most OpenGL programming guides if you've got one. You could always let OpenGL automatically build texture mipmaps and do it all for you.

Share this post


Link to post
Share on other sites
I just don't know about any way to do this automatically in Dx.

Also, I've googled for it with no results. Got any good websites on the matter?

Share this post


Link to post
Share on other sites
DirectX (more precisely the hardware) handles it for you. Just enable mipmapping like this: Direct3DDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); It's explained in detail in the SDK documentation.

Share this post


Link to post
Share on other sites

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