Archived

This topic is now archived and is closed to further replies.

Mipmapped bumpmap?

This topic is 5314 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 is really freaking me out. I had a line of code that looked like this: Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) Then I called a function that would create the bumpmap from a height map, lock the BumpMapTex and shunt the data into it. This all worked fine, but I was getting some visual glitches because manually creating the texture wouldn''t create a mipmap chain. So, I changed the code to this: Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 5, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) And this failed in an amusing (and embarrassing) way - I obviously wasn''t filling the data on the mipmap chains, so the close-to terrain was bump-mapped and the stuff further away was flat. Then I set the line of code back to Set BumpMapTex = D3DX.CreateTexture(d3ddevice, 1024, 1024, 0, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED) which is as it was before. But... it hasn''t changed a damned thing. I am still getting bump-mapping close-to and flat further away. I have scanned the source code for all references to BumpMapTex, and in no way are mipmap levels ever specified other than on that line, which is saying, "0". Any ideas?

Share this post


Link to post
Share on other sites
quote:
Original post by SoaringTortoise
I have scanned the source code for all references to BumpMapTex, and in no way are mipmap levels ever specified other than on that line, which is saying, "0".

IIRC, setting that parameter to 0 makes DX automatically generate as many mipmap levels as possible. To get only one level try setting the parameter to 1.

Share this post


Link to post
Share on other sites