Mip-Mapping in Direct3D 8.x

Started by
5 comments, last by LukeSkyRunner 21 years, 5 months ago
Where can I find a tutorial or example about mip-mapping with Direct3D 8.x?
Advertisement
I thought this is automaticly handled by DX8.0
I know, D3DX helps a lot. But I need any example, because I don''t know HOW do that.
What is the RenderState I need to change to enable the mip-mapping? What is the D3DX function to create the texture mip-maps? Etc...
D3Ddevice.SetTextureStageState 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR

don''t forget to set the number of mipmaps while loading the texture D3DX_DEFAULT works good
Does Dx8 create the blurred far away images or do you have to create them yourself?
You'll Never Beat The Irish!
quote:Original post by Lupin
D3Ddevice.SetTextureStageState 0, D3DTSS_MAGFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MINFILTER, D3DTEXF_LINEAR
D3Ddevice.SetTextureStageState 0, D3DTSS_MIPFILTER, D3DTEXF_LINEAR

don''t forget to set the number of mipmaps while loading the texture D3DX_DEFAULT works good


Thank you! Direct3D''s mip-mapping is sexy ''
quote:Original post by Cuchulainn
Does Dx8 create the blurred far away images or do you have to create them yourself?


It can do. D3DX will also do a better job. Though both are done at runtime so favour speed over quality.

Really the far away image shouldn''t be blurred (i.e. lose detail) or change luminance. For the best looking results mip-maps are better generated offline with gamma correction and frequency aware methods.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement