Mipmapped bumpmap?
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?
quote:Original post by SoaringTortoiseIIRC, 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.
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".
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement