Jump to content
  • Advertisement
Sign in to follow this  
sqpat

mip mapping question (direct X)

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

something im not too clear on: how is mipmapping generally handled by directX? is it on a per-triangle basis or a per-draw call basis? also, ive read auto-mip map generation is available on some cards but not most, so i'm not sure if i want to use it - does it take up a lot of CPU or something to do? I'm also not sure if its something that has to do manually or not to avoid the card doing it; i assume D3DUSAGE_AUTOGENMIPMAP uses the card for automatic mip-mapping, but im not sure about IDirect3DBaseTexture9::GenerateMipSubLevels. Then again it might just be dated information.

Share this post


Link to post
Share on other sites
Advertisement
Mip-mapping is a rasterization level feature and will be done on a per-pixel level as far as I understand it. In reality there may be various hacks on GPU's to determine coefficients per-primitive or per-block (n*n pixels) but conceptually you'd be fine assuming it's a per-pixel operation.

The resource managers will use algorithms to determine which mip levels are available in VRAM at the time rasterization occurs. I can't actually remember the details here, but they're definitely much coarser decisions based on guesstimates as to actual need versus available VRAM and contention ratios.

Auto-generated mip-maps are useful for dynamically changing resource - just as a render target where you only want to draw to the top-level but want the device to down-sample it for you.

For regular static image data you should stick with load-time or preferrably offline mip-map generation depending on your toolchain and storage requirements.


hth
Jack

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!